job_schedules
Creates, updates, deletes, gets or lists a job_schedules resource.
Overview
| Name | job_schedules |
| Type | Resource |
| Id | azure.batch_dataplane.job_schedules |
Fields
The following fields are returned by SELECT queries:
- get_job_schedule
- list_job_schedules
| Name | Datatype | Description |
|---|---|---|
id | string | A string that uniquely identifies the schedule within the Account. Required. |
creationTime | string (date-time) | The creation time of the Job Schedule. Required. |
displayName | string | The display name for the schedule. |
eTag | string | The ETag of the Job Schedule. This is an opaque string. You can use it to detect whether the Job Schedule has changed between requests. In particular, you can be pass the ETag with an Update Job Schedule request to specify that your changes should take effect only if nobody else has modified the schedule in the meantime. Required. |
executionInfo | object | Information about Jobs that have been and will be run under this schedule. Required. |
jobSpecification | object | The details of the Jobs to be created on this schedule. Required. |
lastModified | string (date-time) | The last modified time of the Job Schedule. This is the last time at which the schedule level data, such as the Job specification or recurrence information, changed. It does not factor in job-level changes such as new Jobs being created or Jobs changing state. Required. |
metadata | array | A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. |
previousState | string | The previous state of the Job Schedule. This property is not present if the Job Schedule is in its initial active state. Known values are: "active", "completed", "disabled", "terminating", and "deleting". (active, completed, disabled, terminating, deleting) |
previousStateTransitionTime | string (date-time) | The time at which the Job Schedule entered its previous state. This property is not present if the Job Schedule is in its initial active state. |
schedule | object | The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. |
state | string | The current state of the Job Schedule. Required. Known values are: "active", "completed", "disabled", "terminating", and "deleting". (active, completed, disabled, terminating, deleting) |
stateTransitionTime | string (date-time) | The time at which the Job Schedule entered the current state. Required. |
stats | object | The lifetime resource usage statistics for the Job Schedule. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. |
url | string | The URL of the Job Schedule. Required. |
| Name | Datatype | Description |
|---|---|---|
id | string | A string that uniquely identifies the schedule within the Account. Required. |
creationTime | string (date-time) | The creation time of the Job Schedule. Required. |
displayName | string | The display name for the schedule. |
eTag | string | The ETag of the Job Schedule. This is an opaque string. You can use it to detect whether the Job Schedule has changed between requests. In particular, you can be pass the ETag with an Update Job Schedule request to specify that your changes should take effect only if nobody else has modified the schedule in the meantime. Required. |
executionInfo | object | Information about Jobs that have been and will be run under this schedule. Required. |
jobSpecification | object | The details of the Jobs to be created on this schedule. Required. |
lastModified | string (date-time) | The last modified time of the Job Schedule. This is the last time at which the schedule level data, such as the Job specification or recurrence information, changed. It does not factor in job-level changes such as new Jobs being created or Jobs changing state. Required. |
metadata | array | A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. |
previousState | string | The previous state of the Job Schedule. This property is not present if the Job Schedule is in its initial active state. Known values are: "active", "completed", "disabled", "terminating", and "deleting". (active, completed, disabled, terminating, deleting) |
previousStateTransitionTime | string (date-time) | The time at which the Job Schedule entered its previous state. This property is not present if the Job Schedule is in its initial active state. |
schedule | object | The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. |
state | string | The current state of the Job Schedule. Required. Known values are: "active", "completed", "disabled", "terminating", and "deleting". (active, completed, disabled, terminating, deleting) |
stateTransitionTime | string (date-time) | The time at which the Job Schedule entered the current state. Required. |
stats | object | The lifetime resource usage statistics for the Job Schedule. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. |
url | string | The URL of the Job Schedule. Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_job_schedule | select | job_schedule_id, endpoint | timeOut, ocp-date, If-Modified-Since, If-Unmodified-Since, $select, $expand | Gets information about the specified Job Schedule. |
list_job_schedules | select | endpoint | timeOut, ocp-date, maxresults, $filter, $select, $expand | Lists all of the Job Schedules in the specified Account. Lists all of the Job Schedules in the specified Account. |
create_job_schedule | insert | endpoint, id, schedule, jobSpecification | timeOut, ocp-date | Creates a Job Schedule to the specified Account. Creates a Job Schedule to the specified Account. |
update_job_schedule | update | job_schedule_id, endpoint | timeOut, ocp-date, If-Modified-Since, If-Unmodified-Since | Updates the properties of the specified Job Schedule. This replaces only the Job Schedule properties specified in the request. For example, if the schedule property is not specified with this request, then the Batch service will keep the existing schedule. Changes to a Job Schedule only impact Jobs created by the schedule after the update has taken place; currently running Jobs are unaffected. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
job_schedule_id | string | The ID of the Job Schedule to update. Required. |
$expand | array | An OData $expand clause. Default value is None. |
$filter | string | An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-schedules _. Default value is None. |
$select | array | An OData $select clause. Default value is None. |
If-Modified-Since | string | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. |
If-Unmodified-Since | string | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. |
maxresults | integer | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. |
ocp-date | string | The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. |
timeOut | integer | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. |
SELECT examples
- get_job_schedule
- list_job_schedules
Gets information about the specified Job Schedule.
SELECT
id,
creationTime,
displayName,
eTag,
executionInfo,
jobSpecification,
lastModified,
metadata,
previousState,
previousStateTransitionTime,
schedule,
state,
stateTransitionTime,
stats,
url
FROM azure.batch_dataplane.job_schedules
WHERE job_schedule_id = '{{ job_schedule_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND timeOut = '{{ timeOut }}'
AND ocp-date = '{{ ocp-date }}'
AND If-Modified-Since = '{{ If-Modified-Since }}'
AND If-Unmodified-Since = '{{ If-Unmodified-Since }}'
AND $select = '{{ $select }}'
AND $expand = '{{ $expand }}'
;
Lists all of the Job Schedules in the specified Account. Lists all of the Job Schedules in the specified Account.
SELECT
id,
creationTime,
displayName,
eTag,
executionInfo,
jobSpecification,
lastModified,
metadata,
previousState,
previousStateTransitionTime,
schedule,
state,
stateTransitionTime,
stats,
url
FROM azure.batch_dataplane.job_schedules
WHERE endpoint = '{{ endpoint }}' -- required
AND timeOut = '{{ timeOut }}'
AND ocp-date = '{{ ocp-date }}'
AND maxresults = '{{ maxresults }}'
AND $filter = '{{ $filter }}'
AND $select = '{{ $select }}'
AND $expand = '{{ $expand }}'
;
INSERT examples
- create_job_schedule
- Manifest
Creates a Job Schedule to the specified Account. Creates a Job Schedule to the specified Account.
INSERT INTO azure.batch_dataplane.job_schedules (
id,
displayName,
schedule,
jobSpecification,
metadata,
endpoint,
timeOut,
ocp-date
)
SELECT
'{{ id }}' /* required */,
'{{ displayName }}',
'{{ schedule }}' /* required */,
'{{ jobSpecification }}' /* required */,
'{{ metadata }}',
'{{ endpoint }}',
'{{ timeOut }}',
'{{ ocp-date }}'
;
# Description fields are for documentation purposes
- name: job_schedules
props:
- name: endpoint
value: "{{ endpoint }}"
description: Required parameter for the job_schedules resource.
- name: id
value: "{{ id }}"
description: |
A string that uniquely identifies the schedule 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). Required.
- name: displayName
value: "{{ displayName }}"
description: |
The display name for the schedule. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
- name: schedule
description: |
The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. Required.
value:
doNotRunUntil: "{{ doNotRunUntil }}"
doNotRunAfter: "{{ doNotRunAfter }}"
startWindow: "{{ startWindow }}"
recurrenceInterval: "{{ recurrenceInterval }}"
- name: jobSpecification
description: |
The details of the Jobs to be created on this schedule. Required.
value:
priority: {{ priority }}
allowTaskPreemption: {{ allowTaskPreemption }}
maxParallelTasks: {{ maxParallelTasks }}
displayName: "{{ displayName }}"
usesTaskDependencies: {{ usesTaskDependencies }}
onAllTasksComplete: "{{ onAllTasksComplete }}"
onTaskFailure: "{{ onTaskFailure }}"
networkConfiguration:
subnetId: "{{ subnetId }}"
skipWithdrawFromVNet: {{ skipWithdrawFromVNet }}
constraints:
maxWallClockTime: "{{ maxWallClockTime }}"
maxTaskRetryCount: {{ maxTaskRetryCount }}
jobManagerTask:
id: "{{ id }}"
displayName: "{{ displayName }}"
commandLine: "{{ commandLine }}"
containerSettings:
containerRunOptions: "{{ containerRunOptions }}"
imageName: "{{ imageName }}"
registry:
username: "{{ username }}"
password: "{{ password }}"
registryServer: "{{ registryServer }}"
identityReference:
resourceId: "{{ resourceId }}"
workingDirectory: "{{ workingDirectory }}"
containerHostBatchBindMounts:
- source: "{{ source }}"
isReadOnly: {{ isReadOnly }}
resourceFiles:
- autoStorageContainerName: "{{ autoStorageContainerName }}"
storageContainerUrl: "{{ storageContainerUrl }}"
httpUrl: "{{ httpUrl }}"
blobPrefix: "{{ blobPrefix }}"
filePath: "{{ filePath }}"
fileMode: "{{ fileMode }}"
identityReference:
resourceId: "{{ resourceId }}"
outputFiles:
- filePattern: "{{ filePattern }}"
destination:
container:
path: "{{ path }}"
containerUrl: "{{ containerUrl }}"
identityReference: "{{ identityReference }}"
uploadHeaders: "{{ uploadHeaders }}"
uploadOptions:
uploadCondition: "{{ uploadCondition }}"
environmentSettings:
- name: "{{ name }}"
value: "{{ value }}"
constraints:
maxWallClockTime: "{{ maxWallClockTime }}"
retentionTime: "{{ retentionTime }}"
maxTaskRetryCount: {{ maxTaskRetryCount }}
requiredSlots: {{ requiredSlots }}
killJobOnCompletion: {{ killJobOnCompletion }}
userIdentity:
username: "{{ username }}"
autoUser:
scope: "{{ scope }}"
elevationLevel: "{{ elevationLevel }}"
runExclusive: {{ runExclusive }}
applicationPackageReferences:
- applicationId: "{{ applicationId }}"
version: "{{ version }}"
allowLowPriorityNode: {{ allowLowPriorityNode }}
jobPreparationTask:
id: "{{ id }}"
commandLine: "{{ commandLine }}"
containerSettings:
containerRunOptions: "{{ containerRunOptions }}"
imageName: "{{ imageName }}"
registry:
username: "{{ username }}"
password: "{{ password }}"
registryServer: "{{ registryServer }}"
identityReference:
resourceId: "{{ resourceId }}"
workingDirectory: "{{ workingDirectory }}"
containerHostBatchBindMounts:
- source: "{{ source }}"
isReadOnly: {{ isReadOnly }}
resourceFiles:
- autoStorageContainerName: "{{ autoStorageContainerName }}"
storageContainerUrl: "{{ storageContainerUrl }}"
httpUrl: "{{ httpUrl }}"
blobPrefix: "{{ blobPrefix }}"
filePath: "{{ filePath }}"
fileMode: "{{ fileMode }}"
identityReference:
resourceId: "{{ resourceId }}"
environmentSettings:
- name: "{{ name }}"
value: "{{ value }}"
constraints:
maxWallClockTime: "{{ maxWallClockTime }}"
retentionTime: "{{ retentionTime }}"
maxTaskRetryCount: {{ maxTaskRetryCount }}
waitForSuccess: {{ waitForSuccess }}
userIdentity:
username: "{{ username }}"
autoUser:
scope: "{{ scope }}"
elevationLevel: "{{ elevationLevel }}"
rerunOnNodeRebootAfterSuccess: {{ rerunOnNodeRebootAfterSuccess }}
jobReleaseTask:
id: "{{ id }}"
commandLine: "{{ commandLine }}"
containerSettings:
containerRunOptions: "{{ containerRunOptions }}"
imageName: "{{ imageName }}"
registry:
username: "{{ username }}"
password: "{{ password }}"
registryServer: "{{ registryServer }}"
identityReference:
resourceId: "{{ resourceId }}"
workingDirectory: "{{ workingDirectory }}"
containerHostBatchBindMounts:
- source: "{{ source }}"
isReadOnly: {{ isReadOnly }}
resourceFiles:
- autoStorageContainerName: "{{ autoStorageContainerName }}"
storageContainerUrl: "{{ storageContainerUrl }}"
httpUrl: "{{ httpUrl }}"
blobPrefix: "{{ blobPrefix }}"
filePath: "{{ filePath }}"
fileMode: "{{ fileMode }}"
identityReference:
resourceId: "{{ resourceId }}"
environmentSettings:
- name: "{{ name }}"
value: "{{ value }}"
maxWallClockTime: "{{ maxWallClockTime }}"
retentionTime: "{{ retentionTime }}"
userIdentity:
username: "{{ username }}"
autoUser:
scope: "{{ scope }}"
elevationLevel: "{{ elevationLevel }}"
commonEnvironmentSettings:
- name: "{{ name }}"
value: "{{ value }}"
poolInfo:
poolId: "{{ poolId }}"
autoPoolSpecification:
autoPoolIdPrefix: "{{ autoPoolIdPrefix }}"
poolLifetimeOption: "{{ poolLifetimeOption }}"
keepAlive: {{ keepAlive }}
pool:
displayName: "{{ displayName }}"
vmSize: "{{ vmSize }}"
virtualMachineConfiguration:
imageReference: "{{ imageReference }}"
nodeAgentSKUId: "{{ nodeAgentSKUId }}"
windowsConfiguration: "{{ windowsConfiguration }}"
dataDisks: "{{ dataDisks }}"
licenseType: "{{ licenseType }}"
containerConfiguration: "{{ containerConfiguration }}"
diskEncryptionConfiguration: "{{ diskEncryptionConfiguration }}"
nodePlacementConfiguration: "{{ nodePlacementConfiguration }}"
extensions: "{{ extensions }}"
osDisk: "{{ osDisk }}"
securityProfile: "{{ securityProfile }}"
serviceArtifactReference: "{{ serviceArtifactReference }}"
taskSlotsPerNode: {{ taskSlotsPerNode }}
taskSchedulingPolicy:
jobDefaultOrder: "{{ jobDefaultOrder }}"
nodeFillType: "{{ nodeFillType }}"
resizeTimeout: "{{ resizeTimeout }}"
targetDedicatedNodes: {{ targetDedicatedNodes }}
targetLowPriorityNodes: {{ targetLowPriorityNodes }}
enableAutoScale: {{ enableAutoScale }}
autoScaleFormula: "{{ autoScaleFormula }}"
autoScaleEvaluationInterval: "{{ autoScaleEvaluationInterval }}"
enableInterNodeCommunication: {{ enableInterNodeCommunication }}
networkConfiguration:
subnetId: "{{ subnetId }}"
dynamicVNetAssignmentScope: "{{ dynamicVNetAssignmentScope }}"
endpointConfiguration: "{{ endpointConfiguration }}"
publicIPAddressConfiguration: "{{ publicIPAddressConfiguration }}"
enableAcceleratedNetworking: {{ enableAcceleratedNetworking }}
startTask:
commandLine: "{{ commandLine }}"
containerSettings: "{{ containerSettings }}"
resourceFiles: "{{ resourceFiles }}"
environmentSettings: "{{ environmentSettings }}"
userIdentity: "{{ userIdentity }}"
maxTaskRetryCount: {{ maxTaskRetryCount }}
waitForSuccess: {{ waitForSuccess }}
applicationPackageReferences:
- applicationId: "{{ applicationId }}"
version: "{{ version }}"
userAccounts:
- name: "{{ name }}"
password: "{{ password }}"
elevationLevel: "{{ elevationLevel }}"
linuxUserConfiguration:
uid: {{ uid }}
gid: {{ gid }}
sshPrivateKey: "{{ sshPrivateKey }}"
windowsUserConfiguration:
loginMode: "{{ loginMode }}"
metadata:
- name: "{{ name }}"
value: "{{ value }}"
mountConfiguration:
- azureBlobFileSystemConfiguration:
accountName: "{{ accountName }}"
containerName: "{{ containerName }}"
accountKey: "{{ accountKey }}"
sasKey: "{{ sasKey }}"
blobfuseOptions: "{{ blobfuseOptions }}"
relativeMountPath: "{{ relativeMountPath }}"
identityReference: "{{ identityReference }}"
nfsMountConfiguration:
source: "{{ source }}"
relativeMountPath: "{{ relativeMountPath }}"
mountOptions: "{{ mountOptions }}"
cifsMountConfiguration:
username: "{{ username }}"
source: "{{ source }}"
relativeMountPath: "{{ relativeMountPath }}"
mountOptions: "{{ mountOptions }}"
password: "{{ password }}"
azureFileShareConfiguration:
accountName: "{{ accountName }}"
accountKey: "{{ accountKey }}"
azureFileUrl: "{{ azureFileUrl }}"
relativeMountPath: "{{ relativeMountPath }}"
mountOptions: "{{ mountOptions }}"
upgradePolicy:
mode: "{{ mode }}"
automaticOSUpgradePolicy: "{{ automaticOSUpgradePolicy }}"
rollingUpgradePolicy: "{{ rollingUpgradePolicy }}"
metadata:
- name: "{{ name }}"
value: "{{ value }}"
- name: metadata
description: |
A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
value:
- name: "{{ name }}"
value: "{{ value }}"
- name: timeOut
value: {{ timeOut }}
description: The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None.
description: The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None.
- name: ocp-date
value: "{{ ocp-date }}"
description: The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None.
description: The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None.
UPDATE examples
- update_job_schedule
Updates the properties of the specified Job Schedule. This replaces only the Job Schedule properties specified in the request. For example, if the schedule property is not specified with this request, then the Batch service will keep the existing schedule. Changes to a Job Schedule only impact Jobs created by the schedule after the update has taken place; currently running Jobs are unaffected.
UPDATE azure.batch_dataplane.job_schedules
SET
schedule = '{{ schedule }}',
jobSpecification = '{{ jobSpecification }}',
metadata = '{{ metadata }}'
WHERE
job_schedule_id = '{{ job_schedule_id }}' --required
AND endpoint = '{{ endpoint }}' --required
AND timeOut = '{{ timeOut}}'
AND ocp-date = '{{ ocp-date}}'
AND If-Modified-Since = '{{ If-Modified-Since}}'
AND If-Unmodified-Since = '{{ If-Unmodified-Since}}';