You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/batch/batch-task-fail-event.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
---
2
2
title: Azure Batch task fail event
3
-
description: Reference for Batch task fail event. This event will be emitted in addition to a task complete event and can be used to detect when a task has failed.
3
+
description: Reference for Batch task fail event. This event is emitted in addition to a task complete event and can be used to detect when a task fails.
4
4
ms.topic: reference
5
5
ms.date: 07/01/2025
6
6
---
7
7
8
8
# Task fail event
9
9
10
-
This event is emitted when a task completes with a failure. Currently all nonzero exit codes are considered failures. This event will be emitted *in addition to* a task complete event and can be used to detect when a task has failed.
10
+
This event is emitted when a task completes with a failure. Currently all nonzero exit codes are considered failures. This event is emitted *in addition to* a task complete event and can be used to detect when a task fails.
11
11
12
12
13
13
The following example shows the body of a task fail event.
@@ -43,8 +43,8 @@ ms.date: 07/01/2025
43
43
|------------------|----------|-----------|
44
44
|`jobId`|String|The ID of the job containing the task.|
45
45
|`id`|String|The ID of the task.|
46
-
|`taskType`|String|The type of the task. This can either be 'JobManager' indicating it is a job manager task or 'User' indicating it is not a job manager task. This event is not emitted for job preparation tasks, job release tasks or start tasks.|
47
-
|`systemTaskVersion`|Int32|This is the internal retry counter on a task. Internally the Batch service can retry a task to account for transient issues. These issues can include internal scheduling errors or attempts to recover from compute nodes in a bad state.|
46
+
|`taskType`|String|The type of the task. It's either 'JobManager' indicating it's a job manager task or 'User' indicating it's not a job manager task. It's not emitted for job preparation tasks, job release tasks, or start tasks.|
47
+
|`systemTaskVersion`|Int32|It's the internal retry counter on a task. Internally the Batch service can retry a task to account for transient issues. These issues can include internal scheduling errors or attempts to recover from compute nodes in a bad state.|
48
48
|`requiredSlots`|Int32|The required slots to run the task.|
49
49
|[`nodeInfo`](#nodeInfo)|Complex Type|Contains information about the compute node on which the task ran.|
50
50
|[`multiInstanceSettings`](#multiInstanceSettings)|Complex Type|Specifies that the task is a Multi-Instance Task requiring multiple compute nodes. See [`multiInstanceSettings`](/rest/api/batchservice/get-information-about-a-task) for details.|
@@ -68,15 +68,15 @@ ms.date: 07/01/2025
68
68
69
69
|Element name|Type|Notes|
70
70
|------------------|----------|-----------|
71
-
|`maxTaskRetryCount`|Int32|The maximum number of times the task may be retried. The Batch service retries a task if its exit code is nonzero.<br /><br /> Note that this value specifically controls the number of retries. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries a task up to 4 times (one initial try and 3 retries).<br /><br /> If the maximum retry count is 0, the Batch service does not retry tasks.<br /><br /> If the maximum retry count is -1, the Batch service retries tasks without limit.<br /><br /> The default value is 0 (no retries).|
71
+
|`maxTaskRetryCount`|Int32|The maximum number of times the task may be retried. The Batch service retries a task if its exit code is nonzero.<br /><br /> This value specifically controls the number of retries. The Batch service tries the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries a task up to 4 times (one initial try and 3 retries).<br /><br /> If the maximum retry count is 0, the Batch service doesn't retry tasks.<br /><br /> If the maximum retry count is -1, the Batch service retries tasks without limit.<br /><br /> The default value is 0 (no retries).|
72
72
73
73
74
74
### <aname="executionInfo"></a> executionInfo
75
75
76
76
|Element name|Type|Notes|
77
77
|------------------|----------|-----------|
78
-
|`startTime`|DateTime|The time at which the task started running. 'Running' corresponds to the **running** state, so if the task specifies resource files or application packages, then the start time reflects the time at which the task started downloading or deploying these. If the task has been restarted or retried, this is the most recent time at which the task started running.|
79
-
|`endTime`|DateTime|The time at which the task completed.|
78
+
|`startTime`|DateTime|The time when the task started running. 'Running' corresponds to the **running** state, so if the task specifies resource files or application packages, then the start time reflects the time at which the task started downloading or deploying them. If the task is restarted or retried, it's the most recent time at which the task started running.|
79
+
|`endTime`|DateTime|The time when the task completed.|
80
80
|`exitCode`|Int32|The exit code of the task.|
81
-
|`retryCount`|Int32|The number of times the task has been retried by the Batch service. The task is retried if it exits with a nonzero exit code, up to the specified MaxTaskRetryCount.|
82
-
|`requeueCount`|Int32|The number of times the task has been requeued by the Batch service as the result of a user request.<br /><br /> When the user removes nodes from a pool (by resizing or shrinking the pool) or when the job is being disabled, the user can specify that running tasks on the nodes be requeued for execution. This count tracks how many times the task has been requeued for these reasons.|
81
+
|`retryCount`|Int32|The number of times the task is retried by the Batch service. The task is retried if it exits with a nonzero exit code, up to the specified MaxTaskRetryCount.|
82
+
|`requeueCount`|Int32|The number of times the task is requeued by the Batch service as a result of user request.<br /><br /> When users remove nodes from a pool (by resizing or shrinking it) or disable a job, they can choose to requeue the running tasks on those nodes for execution. This count tracks how many times the task is requeued for these reasons.|
0 commit comments