az batch job

Manage Batch jobs.

Commands

az batch job create

Add a job and associated task(s) to a Batch account.

az batch job create

Add a job and associated task(s) to a Batch account.

az batch job create [--account-endpoint]
                    [--account-key]
                    [--account-name]
                    [--id]
                    [--job-manager-task-command-line]
                    [--job-manager-task-environment-settings]
                    [--job-manager-task-id]
                    [--job-manager-task-resource-files]
                    [--job-max-task-retry-count]
                    [--job-max-wall-clock-time]
                    [--json-file]
                    [--metadata]
                    [--parameters]
                    [--pool-id]
                    [--priority]
                    [--resource-group]
                    [--template]
                    [--uses-task-dependencies]

Optional Parameters

--account-endpoint

Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT.

--account-key

The Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY.

--account-name

The Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT.

--id

Required. A string that uniquely identifies the Job within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case).

--job-manager-task-command-line

The command line of the Job Manager task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux.

--job-manager-task-environment-settings

A list of environment variable settings for the Job Manager task. Space separated values in 'key=value' format.

--job-manager-task-id

A string that uniquely identifies the Job Manager task within the job. The id can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters.

--job-manager-task-resource-files

A list of files that the Batch service will download to the compute node before running the command line. Files listed under this element are located in the task's working directory. Space separated resource references in filename=httpurl format.

--job-max-task-retry-count

The maximum number of times each task may be retried. The Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try each 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). If the maximum retry count is 0, the Batch service does not retry tasks. If the maximum retry count is -1, the Batch service retries tasks without limit. The default value is 0 (no retries).

--job-max-wall-clock-time

The maximum elapsed time that the job may run, measured from the time the job is created. If the job does not complete within the time limit, the Batch service terminates it and any tasks that are still running. In this case, the termination reason will be MaxWallClockTimeExpiry. If this property is not specified, there is no time limit on how long the job may run. Expected format is an ISO-8601 duration.

--json-file

The file containing the job to create in JSON format, if this parameter is specified, all other parameters are ignored.

--metadata

A list of name-value pairs associated with the job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. Space separated values in 'key=value' format.

--parameters

Parameter values for a Batch job JSON template file. Can only be used with --template.

--pool-id

The id of an existing pool. All the tasks of the job will run on the specified pool.

--priority

The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0.

--resource-group

The resource group of the Batch account.

--template

A Batch job JSON template file. If this parameter is specified, all other parameters are ignored.

--uses-task-dependencies

The flag that determines if this job will use tasks with dependencies. True if flag present.