Skip to main content

job_schedules

Creates, updates, deletes, gets or lists a job_schedules resource.

Overview

Namejob_schedules
TypeResource
Idazure.batch_dataplane.job_schedules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringA string that uniquely identifies the schedule within the Account. Required.
creationTimestring (date-time)The creation time of the Job Schedule. Required.
displayNamestringThe display name for the schedule.
eTagstringThe 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.
executionInfoobjectInformation about Jobs that have been and will be run under this schedule. Required.
jobSpecificationobjectThe details of the Jobs to be created on this schedule. Required.
lastModifiedstring (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.
metadataarrayA 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.
previousStatestringThe 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)
previousStateTransitionTimestring (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.
scheduleobjectThe schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time.
statestringThe current state of the Job Schedule. Required. Known values are: "active", "completed", "disabled", "terminating", and "deleting". (active, completed, disabled, terminating, deleting)
stateTransitionTimestring (date-time)The time at which the Job Schedule entered the current state. Required.
statsobjectThe 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.
urlstringThe URL of the Job Schedule. Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_job_scheduleselectjob_schedule_id, endpointtimeOut, ocp-date, If-Modified-Since, If-Unmodified-Since, $select, $expandGets information about the specified Job Schedule.
list_job_schedulesselectendpointtimeOut, ocp-date, maxresults, $filter, $select, $expandLists all of the Job Schedules in the specified Account. Lists all of the Job Schedules in the specified Account.
create_job_scheduleinsertendpoint, id, schedule, jobSpecificationtimeOut, ocp-dateCreates a Job Schedule to the specified Account. Creates a Job Schedule to the specified Account.
update_job_scheduleupdatejob_schedule_id, endpointtimeOut, ocp-date, If-Modified-Since, If-Unmodified-SinceUpdates 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.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )
job_schedule_idstringThe ID of the Job Schedule to update. Required.
$expandarrayAn OData $expand clause. Default value is None.
$filterstringAn 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.
$selectarrayAn OData $select clause. Default value is None.
If-Modified-SincestringA 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-SincestringA 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.
maxresultsintegerThe maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None.
ocp-datestringThe 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.
timeOutintegerThe 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

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 }}'
;

INSERT examples

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 }}'
;

UPDATE examples

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}}';