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-job-task-error-checking.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
1
---
2
2
title: Check for job and task errors
3
-
description: Learn how to check for and handle errors that occur after Azure Batch jobs and tasks are submitted..
3
+
description: Learn how to check for and handle errors that occur after Azure Batch jobs and tasks are submitted.
4
4
ms.topic: how-to
5
5
ms.date: 04/11/2023
6
6
---
7
7
8
8
# Azure Batch job and task errors
9
9
10
-
Various errors can happen when you add Azure Batch jobs and tasks or when you schedule and run jobs and tasks. It's straightforward to detect errors that occur when you add jobs and tasks, because any failures are returned immediately by the API, command line, or user interface. This article covers how to check for and handle errors that occur after jobs and tasks are submitted.
10
+
Various errors can happen when you add Azure Batch jobs and tasks or when you schedule and run jobs and tasks. It's usually straightforward to detect errors that occur when you add jobs and tasks, because the API, command line, or user interface returns any failures immediately. This article covers how to check for and handle errors that occur after jobs and tasks are submitted.
11
11
12
12
## Job failures
13
13
14
-
A job is a group of one or more tasks, which specify command lines to run. You can specify the following optional parameters when you add a job, which influence how the job can fail:
14
+
A job is a group of one or more tasks, which specify command lines to run. You can specify the following optional parameters when you add a job. These parameters influence how the job can fail.
15
15
16
16
-[JobConstraints](/rest/api/batchservice/job/add#jobconstraints). You can optionally use the `maxWallClockTime` property to set the maximum amount of time a job can be active or running. If the job exceeds the `maxWallClockTime`, the job terminates with the `terminateReason` property set in the [JobExecutionInformation](/rest/api/batchservice/job/get#jobexecutioninformation).
17
17
@@ -31,17 +31,17 @@ Check the following job properties in the [JobExecutionInformation](/rest/api/ba
31
31
32
32
### Job preparation tasks
33
33
34
-
If you specify a [job preparation task](batch-job-prep-release.md#job-preparation-task)for a job, an instance of the job preparation task runs on a node the first time the node runs a task for that job. You can think of the job preparation task as a task template, with multiple instances being run, up to the number of nodes in a pool. Check the job preparation task instances to determine if there were errors.
34
+
An instance of a [job preparation task](batch-job-prep-release.md#job-preparation-task) runs on a node the first time the node runs a task for the job. You can think of the job preparation task as a task template, with multiple instances being run, up to the number of nodes in a pool. Check the job preparation task instances to determine if there were errors.
35
35
36
36
You can use the [Job - List Preparation and Release Task Status](/rest/api/batchservice/job/listpreparationandreleasetaskstatus) API to list the execution status of all instances of job preparation and release tasks for a specified job. As with other tasks, [JobPreparationTaskExecutionInformation](/rest/api/batchservice/job/listpreparationandreleasetaskstatus#jobpreparationtaskexecutioninformation) is available with properties such as `failureInfo`, `exitCode`, and `result`.
37
37
38
38
When a job preparation task runs, the task that triggered the job preparation task moves to a [taskState](/rest/api/batchservice/task/get#taskstate) of `preparing`. If the job preparation task fails, the triggering task reverts to the `active` state and doesn't run.
39
39
40
-
If job preparation tasks fail and the triggering job task doesn't run, the job doesn't complete and is stuck. The pool might not be used if there are no other jobs with tasks that can be scheduled.
40
+
If a job preparation task fails, the triggering job task doesn't run. The job doesn't complete and is stuck. The pool might not be used if there are no other jobs with tasks that can be scheduled.
41
41
42
42
### Job release tasks
43
43
44
-
If you specify a [job release task](batch-job-prep-release.md#job-release-task)for a job, an instance of the job release task runs on each pool node where a job preparation task ran when the job is being terminated. Check the job release task instances to determine if there were errors.
44
+
An instance of a [job release task](batch-job-prep-release.md#job-release-task)runs when the job is being terminated on each node that ran a job preparation task. Check the job release task instances to determine if there were errors.
45
45
46
46
You can use the [Job - List Preparation and Release Task Status](/rest/api/batchservice/job/listpreparationandreleasetaskstatus) API to list the execution status of all instances of job preparation and release tasks for a specified job. As with other tasks, [JobReleaseTaskExecutionInformation](/rest/api/batchservice/job/listpreparationandreleasetaskstatus#jobreleasetaskexecutioninformation) is available with properties such as `failureInfo`, `exitCode`, and `result`.
47
47
@@ -51,7 +51,7 @@ If one or more job release tasks fail, the job is still terminated and moves to
51
51
52
52
Job tasks can fail for the following reasons:
53
53
54
-
- The task command line fails and returns with a non-zero exit code.
54
+
- The task command line fails and returns with a nonzero exit code.
55
55
- One or more `resourceFiles` specified for a task don't download.
56
56
- One or more `outputFiles` specified for a task don't upload.
57
57
- The elapsed time for the task exceeds the `maxWallClockTime` property specified in the [TaskConstraints](/rest/api/batchservice/task/add#taskconstraints).
0 commit comments