Skip to main content

jobs

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

Overview

Namejobs
TypeResource
Idazure.scheduler.jobs

Fields

NameDatatypeDescription
idtextGets the job resource identifier.
nametextGets the job resource name.
actiontextfield from the properties object
jobCollectionNametextfield from the properties object
jobNametextfield from the properties object
recurrencetextfield from the properties object
resourceGroupNametextfield from the properties object
start_timetextfield from the properties object
statetextfield from the properties object
statustextfield from the properties object
subscriptionIdtextfield from the properties object
typetextGets the job resource type.

Methods

NameAccessible byRequired ParamsDescription
getSELECTjobCollectionName, jobName, resourceGroupName, subscriptionIdGets a job.
listSELECTjobCollectionName, resourceGroupName, subscriptionIdLists all jobs under the specified job collection.
create_or_updateINSERTjobCollectionName, jobName, resourceGroupName, subscriptionIdProvisions a new job or updates an existing job.
deleteDELETEjobCollectionName, jobName, resourceGroupName, subscriptionIdDeletes a job.
patchUPDATEjobCollectionName, jobName, resourceGroupName, subscriptionIdPatches an existing job.
runEXECjobCollectionName, jobName, resourceGroupName, subscriptionIdRuns a job.

SELECT examples

Lists all jobs under the specified job collection.

SELECT
id,
name,
action,
jobCollectionName,
jobName,
recurrence,
resourceGroupName,
start_time,
state,
status,
subscriptionId,
type
FROM azure.scheduler.vw_jobs
WHERE jobCollectionName = '{{ jobCollectionName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new jobs resource.

/*+ create */
INSERT INTO azure.scheduler.jobs (
jobCollectionName,
jobName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ jobCollectionName }}',
'{{ jobName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

UPDATE example

Updates a jobs resource.

/*+ update */
UPDATE azure.scheduler.jobs
SET
properties = '{{ properties }}'
WHERE
jobCollectionName = '{{ jobCollectionName }}'
AND jobName = '{{ jobName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified jobs resource.

/*+ delete */
DELETE FROM azure.scheduler.jobs
WHERE jobCollectionName = '{{ jobCollectionName }}'
AND jobName = '{{ jobName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';