Skip to content

Commit 2a121c5

Browse files
authored
Merge pull request #105070 from LauraBrenner/laura-job-scheduling
Laura job scheduling
2 parents 3b17b0a + f69d5f2 commit 2a121c5

File tree

6 files changed

+92
-2
lines changed

6 files changed

+92
-2
lines changed

articles/batch/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@
123123
href: batch-user-accounts.md
124124
- name: Submit a large number of tasks
125125
href: large-number-tasks.md
126+
- name: Schedule jobs for efficiency
127+
href: batch-job-schedule.md
126128
- name: Check for job and task errors
127129
href: batch-job-task-error-checking.md
128130
- name: Detecting and handling Batch service errors

articles/batch/batch-automatic-scaling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ You can get the value of these service-defined variables to make adjustments tha
130130
| $SucceededTasks |The number of tasks that finished successfully. |
131131
| $FailedTasks |The number of tasks that failed. |
132132
| $CurrentDedicatedNodes |The current number of dedicated compute nodes. |
133-
| $CurrentLowPriorityNodes |The current number of low-priority compute nodes, including any nodes that have been pre-empted. |
134-
| $PreemptedNodeCount | The number of nodes in the pool that are in a pre-empted state. |
133+
| $CurrentLowPriorityNodes |The current number of low-priority compute nodes, including any nodes that have been preempted. |
134+
| $PreemptedNodeCount | The number of nodes in the pool that are in a preempted state. |
135135

136136
> [!TIP]
137137
> The read-only, service-defined variables that are shown in the previous table are *objects* that provide various methods to access data associated with each. For more information, see [Obtain sample data](#getsampledata) later in this article.

articles/batch/batch-job-schedule.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Schedule your jobs
3+
description: Use job scheduling to manage your tasks.
4+
services: batch
5+
author: LauraBrenner
6+
manager: evansma
7+
editor: ''
8+
9+
ms.assetid: 63d9d4f1-8521-4bbb-b95a-c4cad73692d3
10+
ms.service: batch
11+
ms.topic: article
12+
ms.workload: big-compute
13+
ms.date: 02/20/2020
14+
ms.author: labrenne
15+
ms.custom: seodec18
16+
17+
---
18+
19+
# Schedule jobs for efficiency
20+
21+
Scheduling Batch jobs enables you to prioritize the jobs you want to run first while taking into account tasks that have dependencies on other tasks. By scheduling your jobs, you can make sure you use the least amount of resources. Nodes can be decommissioned when not needed, tasks that are dependent on other tasks are spun up just in time optimizing the workflows. Only one job at a time runs. A new one won't start until the previous one completes. You can set your job to autocomplete.
22+
23+
## Benefit of job scheduling
24+
25+
The benefit of scheduling jobs is that you can specify a schedule for job creation.The tasks you schedule using job manager task are associated with a job. The job manager task will create tasks for the job. To do so, the job manager task needs to authenticate with the Batch account. Use the the AZ_BATCH_AUTHENTICATION_TOKEN access token. The token will allow access to the rest of the job.
26+
27+
## Use the portal to schedule a job
28+
29+
1. Sign in to [Azure portal](https://portal.azure.com/).
30+
31+
2. Select the Batch account you want to schedule jobs in.
32+
33+
3. Select **Add** to create a new job schedule and complete the **Basic form**.
34+
35+
36+
37+
![Schedule a job][1]
38+
39+
**Job schedule ID**: The unique identifier for this job schedule.
40+
41+
**Display name**: The display name for the job doesn't have to be unique but has a maximum length of 1024 characters.
42+
43+
**Do not run until**: Specifies the earliest time the job will run. If you don't set this, the schedule becomes ready to run jobs immediately.
44+
45+
**Do not run after**: No jobs run after the time you set here. If you don't specify a time, then you are creating a recurring job schedule which remains active until you explicitly terminate it.
46+
47+
**Recurrence interval**: You can specify the amount of time between jobs. You can have only one job at a time scheduled, so if it is time to create a new job under a job schedule, but the previous job is still running, the Batch service will not create the new job until the previous job finishes.
48+
49+
**Start window**: Here you specify the time interval, starting from the time the schedule indicates a job should be created, until it should be completed. If the current job doesn't complete during its window, the next job won't start.
50+
51+
At the bottom of the basic form, you will specify the pool on which you want the job to run. To find your pool ID information, select **Update**.
52+
53+
![Specify pool][2]
54+
55+
56+
**Pool ID**: Identify the pool you will run the job on.
57+
58+
**Job configuration task**: Select **Update** to name the Job Manager task as well as the Job preparation and release tasks, if you are using them.
59+
60+
**Priority**: Give the job a priority.
61+
62+
**Max wall clock time**: Set the maximum amount of time the job can run for. If it doesn't complete within the time frame, Batch terminates the job. If you don't set this, then there is no time limit for the job.
63+
64+
**Max task retry count**: Specify the number of times a task can be retried up to a maximum of four times. This is not the same as the number of retries an API call might have.
65+
66+
**When all tasks complete**: The default is no action.
67+
68+
**When a task fails**: The default is no action. A task fails if the retry count is exhausted or there was an error when starting the task.
69+
70+
After you select **Save**, if you go to **Job schedules** in the left navigation, you can track the execution of the job, by selecting **Execution info**.
71+
72+
73+
## For more information
74+
75+
To manage a job using the Azure CLI, see [az batch job-schedule](https://docs.microsoft.com/cli/azure/batch/job-schedule?view=azure-cli-latest).
76+
77+
## Next steps
78+
79+
[Create task dependencies to run tasks that depend on other tasks](batch-task-dependencies.md).
80+
81+
82+
83+
84+
85+
[1]: ./media/batch-job-schedule/add_job_schedule-02.png
86+
[2]: ./media/batch-job-schedule/add_job_schedule-03.png
87+
88+
53 KB
Loading
45.2 KB
Loading
43.8 KB
Loading

0 commit comments

Comments
 (0)