Skip to main content

jobs_from_schedules

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

Overview

Namejobs_from_schedules
TypeResource
Idazure.batch_dataplane.jobs_from_schedules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringA string that uniquely identifies the Job within the Account. 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.
allowTaskPreemptionbooleanWhether Tasks in this job can be preempted by other high priority jobs. (This property is not available by default. Please contact support for more information) If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.
commonEnvironmentSettingsarrayThe list of common environment variable settings. These environment variables are set for all Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value.
constraintsobjectThe execution constraints for the Job.
creationTimestring (date-time)The creation time of the Job. Required.
displayNamestringThe display name for the Job.
eTagstringThe ETag of the Job. This is an opaque string. You can use it to detect whether the Job has changed between requests. In particular, you can be pass the ETag when updating a Job to specify that your changes should take effect only if nobody else has modified the Job in the meantime. Required.
executionInfoobjectThe execution information for the Job.
jobManagerTaskobjectDetails of a Job Manager Task to be launched when the Job is started.
jobPreparationTaskobjectThe Job Preparation Task. The Job Preparation Task is a special Task run on each Compute Node before any other Task of the Job.
jobReleaseTaskobjectThe Job Release Task. The Job Release Task is a special Task run at the end of the Job on each Compute Node that has run any other Task of the Job.
lastModifiedstring (date-time)The last modified time of the Job. This is the last time at which the Job level data, such as the Job state or priority, changed. It does not factor in task-level changes such as adding new Tasks or Tasks changing state. Required.
maxParallelTasksintegerThe maximum number of tasks that can be executed in parallel for the job. (This property is not available by default. Please contact support for more information) The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API.
metadataarrayA 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.
networkConfigurationobject(This property is not available by default. Please contact support for more information) The network configuration for the Job.
onAllTasksCompletestringThe action the Batch service should take when all Tasks in the Job are in the completed state. The default is noaction. Known values are: "noaction" and "terminatejob". (noaction, terminatejob)
onTaskFailurestringThe action the Batch service should take when any Task in the Job fails. A Task is considered to have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. Known values are: "noaction" and "performexitoptionsjobaction". (noaction, performexitoptionsjobaction)
poolInfoobjectThe Pool settings associated with the Job. Required.
previousStatestringThe previous state of the Job. This property is not set if the Job is in its initial Active state. Known values are: "active", "disabling", "disabled", "enabling", "terminating", "completed", and "deleting". (active, disabling, disabled, enabling, terminating, completed, deleting)
previousStateTransitionTimestring (date-time)The time at which the Job entered its previous state. This property is not set if the Job is in its initial Active state.
priorityintegerThe 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.
statestringThe current state of the Job. Required. Known values are: "active", "disabling", "disabled", "enabling", "terminating", "completed", and "deleting". (active, disabling, disabled, enabling, terminating, completed, deleting)
stateTransitionTimestring (date-time)The time at which the Job entered its current state. Required.
statsobjectResource usage statistics for the entire lifetime of the Job. This property is populated only if the BatchJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. 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. Required.
usesTaskDependenciesbooleanWhether Tasks in the Job can define dependencies on each other. The default is false.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_jobs_from_scheduleselectjob_schedule_id, endpointtimeOut, ocp-date, maxresults, $filter, $select, $expandLists the Jobs that have been created under the specified Job Schedule. Lists the Jobs that have been created under the specified Job Schedule.

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 from which you want to get a list of Jobs. 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-jobs-in-a-job-schedule _. Default value is None.
$selectarrayAn OData $select clause. 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

Lists the Jobs that have been created under the specified Job Schedule. Lists the Jobs that have been created under the specified Job Schedule.

SELECT
id,
allowTaskPreemption,
commonEnvironmentSettings,
constraints,
creationTime,
displayName,
eTag,
executionInfo,
jobManagerTask,
jobPreparationTask,
jobReleaseTask,
lastModified,
maxParallelTasks,
metadata,
networkConfiguration,
onAllTasksComplete,
onTaskFailure,
poolInfo,
previousState,
previousStateTransitionTime,
priority,
state,
stateTransitionTime,
stats,
url,
usesTaskDependencies
FROM azure.batch_dataplane.jobs_from_schedules
WHERE job_schedule_id = '{{ job_schedule_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND timeOut = '{{ timeOut }}'
AND ocp-date = '{{ ocp-date }}'
AND maxresults = '{{ maxresults }}'
AND $filter = '{{ $filter }}'
AND $select = '{{ $select }}'
AND $expand = '{{ $expand }}'
;