Microsoft.Scheduler jobCollections/jobs template reference

Template format

To create a Microsoft.Scheduler/jobCollections/jobs resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.Scheduler/jobCollections/jobs",
  "apiVersion": "2016-03-01",
  "properties": {
    "startTime": "string",
    "action": {
      "type": "string",
      "request": {
        "authentication": {
          "type": "string"
        },
        "uri": "string",
        "method": "string",
        "body": "string",
        "headers": {}
      },
      "queueMessage": {
        "storageAccount": "string",
        "queueName": "string",
        "sasToken": "string",
        "message": "string"
      },
      "serviceBusQueueMessage": {
        "authentication": {
          "sasKey": "string",
          "sasKeyName": "string",
          "type": "string"
        },
        "brokeredMessageProperties": {
          "contentType": "string",
          "correlationId": "string",
          "forcePersistence": "boolean",
          "label": "string",
          "messageId": "string",
          "partitionKey": "string",
          "replyTo": "string",
          "replyToSessionId": "string",
          "scheduledEnqueueTimeUtc": "string",
          "sessionId": "string",
          "timeToLive": "string",
          "to": "string",
          "viaPartitionKey": "string"
        },
        "customMessageProperties": {},
        "message": "string",
        "namespace": "string",
        "transportType": "string",
        "queueName": "string"
      },
      "serviceBusTopicMessage": {
        "authentication": {
          "sasKey": "string",
          "sasKeyName": "string",
          "type": "string"
        },
        "brokeredMessageProperties": {
          "contentType": "string",
          "correlationId": "string",
          "forcePersistence": "boolean",
          "label": "string",
          "messageId": "string",
          "partitionKey": "string",
          "replyTo": "string",
          "replyToSessionId": "string",
          "scheduledEnqueueTimeUtc": "string",
          "sessionId": "string",
          "timeToLive": "string",
          "to": "string",
          "viaPartitionKey": "string"
        },
        "customMessageProperties": {},
        "message": "string",
        "namespace": "string",
        "transportType": "string",
        "topicPath": "string"
      },
      "retryPolicy": {
        "retryType": "string",
        "retryInterval": "string",
        "retryCount": "integer"
      },
      "errorAction": {
        "type": "string",
        "request": {
          "authentication": {
            "type": "string"
          },
          "uri": "string",
          "method": "string",
          "body": "string",
          "headers": {}
        },
        "queueMessage": {
          "storageAccount": "string",
          "queueName": "string",
          "sasToken": "string",
          "message": "string"
        },
        "serviceBusQueueMessage": {
          "authentication": {
            "sasKey": "string",
            "sasKeyName": "string",
            "type": "string"
          },
          "brokeredMessageProperties": {
            "contentType": "string",
            "correlationId": "string",
            "forcePersistence": "boolean",
            "label": "string",
            "messageId": "string",
            "partitionKey": "string",
            "replyTo": "string",
            "replyToSessionId": "string",
            "scheduledEnqueueTimeUtc": "string",
            "sessionId": "string",
            "timeToLive": "string",
            "to": "string",
            "viaPartitionKey": "string"
          },
          "customMessageProperties": {},
          "message": "string",
          "namespace": "string",
          "transportType": "string",
          "queueName": "string"
        },
        "serviceBusTopicMessage": {
          "authentication": {
            "sasKey": "string",
            "sasKeyName": "string",
            "type": "string"
          },
          "brokeredMessageProperties": {
            "contentType": "string",
            "correlationId": "string",
            "forcePersistence": "boolean",
            "label": "string",
            "messageId": "string",
            "partitionKey": "string",
            "replyTo": "string",
            "replyToSessionId": "string",
            "scheduledEnqueueTimeUtc": "string",
            "sessionId": "string",
            "timeToLive": "string",
            "to": "string",
            "viaPartitionKey": "string"
          },
          "customMessageProperties": {},
          "message": "string",
          "namespace": "string",
          "transportType": "string",
          "topicPath": "string"
        },
        "retryPolicy": {
          "retryType": "string",
          "retryInterval": "string",
          "retryCount": "integer"
        }
      }
    },
    "recurrence": {
      "frequency": "string",
      "interval": "integer",
      "count": "integer",
      "endTime": "string",
      "schedule": {
        "weekDays": [
          "string"
        ],
        "hours": [
          "integer"
        ],
        "minutes": [
          "integer"
        ],
        "monthDays": [
          "integer"
        ],
        "monthlyOccurrences": [
          {
            "day": "string",
            "Occurrence": "integer"
          }
        ]
      }
    },
    "state": "string"
  }
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Scheduler/jobCollections/jobs object

Name Type Required Value
name string Yes
type enum Yes Microsoft.Scheduler/jobCollections/jobs
apiVersion enum Yes 2016-03-01
properties object Yes Gets or sets the job properties. - JobProperties object

JobProperties object

Name Type Required Value
startTime string No Gets or sets the job start time.
action object No Gets or sets the job action. - JobAction object
recurrence object No Gets or sets the job recurrence. - JobRecurrence object
state enum No Gets or set the job state. - Enabled, Disabled, Faulted, Completed

JobAction object

Name Type Required Value
type enum No Gets or sets the job action type. - Http, Https, StorageQueue, ServiceBusQueue, ServiceBusTopic
request object No Gets or sets the http requests. - HttpRequest object
queueMessage object No Gets or sets the storage queue message. - StorageQueueMessage object
serviceBusQueueMessage object No Gets or sets the service bus queue message. - ServiceBusQueueMessage object
serviceBusTopicMessage object No Gets or sets the service bus topic message. - ServiceBusTopicMessage object
retryPolicy object No Gets or sets the retry policy. - RetryPolicy object
errorAction object No Gets or sets the error action. - JobErrorAction object

JobRecurrence object

Name Type Required Value
frequency enum No Gets or sets the frequency of recurrence (second, minute, hour, day, week, month). - Minute, Hour, Day, Week, Month
interval integer No Gets or sets the interval between retries.
count integer No Gets or sets the maximum number of times that the job should run.
endTime string No Gets or sets the time at which the job will complete.
schedule object No JobRecurrenceSchedule object

HttpRequest object

Name Type Required Value
authentication object No Gets or sets the authentication method of the request. - HttpAuthentication object
uri string No Gets or sets the URI of the request.
method string No Gets or sets the method of the request.
body string No Gets or sets the request body.
headers object No Gets or sets the headers.

StorageQueueMessage object

Name Type Required Value
storageAccount string No Gets or sets the storage account name.
queueName string No Gets or sets the queue name.
sasToken string No Gets or sets the SAS key.
message string No Gets or sets the message.

ServiceBusQueueMessage object

Name Type Required Value
authentication object No Gets or sets the Service Bus authentication. - ServiceBusAuthentication object
brokeredMessageProperties object No Gets or sets the brokered message properties. - ServiceBusBrokeredMessageProperties object
customMessageProperties object No Gets or sets the custom message properties.
message string No Gets or sets the message.
namespace string No Gets or sets the namespace.
transportType enum No Gets or sets the transport type. - NotSpecified, NetMessaging, AMQP
queueName string No Gets or sets the queue name.

ServiceBusTopicMessage object

Name Type Required Value
authentication object No Gets or sets the Service Bus authentication. - ServiceBusAuthentication object
brokeredMessageProperties object No Gets or sets the brokered message properties. - ServiceBusBrokeredMessageProperties object
customMessageProperties object No Gets or sets the custom message properties.
message string No Gets or sets the message.
namespace string No Gets or sets the namespace.
transportType enum No Gets or sets the transport type. - NotSpecified, NetMessaging, AMQP
topicPath string No Gets or sets the topic path.

RetryPolicy object

Name Type Required Value
retryType enum No Gets or sets the retry strategy to be used. - None or Fixed
retryInterval string No Gets or sets the retry interval between retries, specify duration in ISO 8601 format.
retryCount integer No Gets or sets the number of times a retry should be attempted.

JobErrorAction object

Name Type Required Value
type enum No Gets or sets the job error action type. - Http, Https, StorageQueue, ServiceBusQueue, ServiceBusTopic
request object No Gets or sets the http requests. - HttpRequest object
queueMessage object No Gets or sets the storage queue message. - StorageQueueMessage object
serviceBusQueueMessage object No Gets or sets the service bus queue message. - ServiceBusQueueMessage object
serviceBusTopicMessage object No Gets or sets the service bus topic message. - ServiceBusTopicMessage object
retryPolicy object No Gets or sets the retry policy. - RetryPolicy object

JobRecurrenceSchedule object

Name Type Required Value
weekDays array No Gets or sets the days of the week that the job should execute on. - Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
hours array No Gets or sets the hours of the day that the job should execute at. - integer
minutes array No Gets or sets the minutes of the hour that the job should execute at. - integer
monthDays array No Gets or sets the days of the month that the job should execute on. Must be between 1 and 31. - integer
monthlyOccurrences array No Gets or sets the occurrences of days within a month. - JobRecurrenceScheduleMonthlyOccurrence object

HttpAuthentication object

Name Type Required Value
type string Yes

ServiceBusAuthentication object

Name Type Required Value
sasKey string No Gets or sets the SAS key.
sasKeyName string No Gets or sets the SAS key name.
type enum No Gets or sets the authentication type. - NotSpecified or SharedAccessKey

ServiceBusBrokeredMessageProperties object

Name Type Required Value
contentType string No Gets or sets the content type.
correlationId string No Gets or sets the correlation ID.
forcePersistence boolean No Gets or sets the force persistence.
label string No Gets or sets the label.
messageId string No Gets or sets the message ID.
partitionKey string No Gets or sets the partition key.
replyTo string No Gets or sets the reply to.
replyToSessionId string No Gets or sets the reply to session ID.
scheduledEnqueueTimeUtc string No Gets or sets the scheduled enqueue time UTC.
sessionId string No Gets or sets the session ID.
timeToLive string No Gets or sets the time to live.
to string No Gets or sets the to.
viaPartitionKey string No Gets or sets the via partition key.

JobRecurrenceScheduleMonthlyOccurrence object

Name Type Required Value
day enum No Gets or sets the day. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday. - Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
Occurrence integer No Gets or sets the occurrence. Must be between -5 and 5.

Quickstart templates

The following quickstart templates deploy this resource type.