JobManagerTask Class

Definition

Specifies details of a Job Manager Task.

public class JobManagerTask
type JobManagerTask = class
Public Class JobManagerTask
Inheritance
JobManagerTask

Remarks

The Job Manager Task is automatically started when the Job is created. The Batch service tries to schedule the Job Manager Task before any other Tasks in the Job. When shrinking a Pool, the Batch service tries to preserve Nodes where Job Manager Tasks are running for as long as possible (that is, Compute Nodes running 'normal' Tasks are removed before Compute Nodes running Job Manager Tasks). When a Job Manager Task fails and needs to be restarted, the system tries to schedule it at the highest priority. If there are no idle Compute Nodes available, the system may terminate one of the running Tasks in the Pool and return it to the queue in order to make room for the Job Manager Task to restart. Note that a Job Manager Task in one Job does not have priority over Tasks in other Jobs. Across Jobs, only Job level priorities are observed. For example, if a Job Manager in a priority 0 Job needs to be restarted, it will not displace Tasks of a priority 1 Job. Batch will retry Tasks when a recovery operation is triggered on a Node. Examples of recovery operations include (but are not limited to) when an unhealthy Node is rebooted or a Compute Node disappeared due to host failure. Retries due to recovery operations are independent of and are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. Because of this, all Tasks should be idempotent. This means Tasks need to tolerate being interrupted and restarted without causing any corruption or duplicate data. The best practice for long running Tasks is to use some form of checkpointing.

Constructors

JobManagerTask()

Initializes a new instance of the JobManagerTask class.

JobManagerTask(String, String, String, TaskContainerSettings, IList<ResourceFile>, IList<OutputFile>, IList<EnvironmentSetting>, TaskConstraints, Nullable<Int32>, Nullable<Boolean>, UserIdentity, Nullable<Boolean>, IList<ApplicationPackageReference>, AuthenticationTokenSettings, Nullable<Boolean>)

Initializes a new instance of the JobManagerTask class.

Properties

AllowLowPriorityNode

Gets or sets whether the Job Manager Task may run on a Spot/Low-priority Compute Node.

ApplicationPackageReferences

Gets or sets a list of Application Packages that the Batch service will deploy to the Compute Node before running the command line.

AuthenticationTokenSettings

Gets or sets the settings for an authentication token that the Task can use to perform Batch service operations.

CommandLine

Gets or sets the command line of the Job Manager Task.

Constraints

Gets or sets constraints that apply to the Job Manager Task.

ContainerSettings

Gets or sets the settings for the container under which the Job Manager Task runs.

DisplayName

Gets or sets the display name of the Job Manager Task.

EnvironmentSettings

Gets or sets a list of environment variable settings for the Job Manager Task.

Id

Gets or sets a string that uniquely identifies the Job Manager Task within the Job.

KillJobOnCompletion

Gets or sets whether completion of the Job Manager Task signifies completion of the entire Job.

OutputFiles

Gets or sets a list of files that the Batch service will upload from the Compute Node after running the command line.

RequiredSlots

Gets or sets the number of scheduling slots that the Task requires to run.

ResourceFiles

Gets or sets a list of files that the Batch service will download to the Compute Node before running the command line.

RunExclusive

Gets or sets whether the Job Manager Task requires exclusive use of the Compute Node where it runs.

UserIdentity

Gets or sets the user identity under which the Job Manager Task runs.

Applies to