Job Schedule - Create
Create a job schedule.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}?api-version=2023-11-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
automation
|
path | True |
string |
The name of the automation account. |
job
|
path | True |
string uuid |
The job schedule name. |
resource
|
path | True |
string |
Name of an Azure Resource group. Regex pattern: |
subscription
|
path | True |
string |
Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
api-version
|
query | True |
string |
Client Api Version. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
properties.runbook | True |
Gets or sets the runbook. |
|
properties.schedule | True |
Gets or sets the schedule. |
|
properties.parameters |
object |
Gets or sets a list of job properties. |
|
properties.runOn |
string |
Gets or sets the hybrid worker group that the scheduled job should run on. |
Responses
Name | Type | Description |
---|---|---|
201 Created |
Created |
|
Other Status Codes |
Automation error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Create a job schedule
Sample request
PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobSchedules/0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc?api-version=2023-11-01
{
"properties": {
"schedule": {
"name": "ScheduleNameGoesHere332204b5-debe-4348-a5c7-6357457189f2"
},
"runbook": {
"name": "TestRunbook"
},
"parameters": {
"jobscheduletag01": "jobschedulevalue01",
"jobscheduletag02": "jobschedulevalue02"
}
}
}
Sample response
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobSchedules/0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc",
"properties": {
"jobScheduleId": "0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc",
"runbook": {
"name": "TestRunbook"
},
"schedule": {
"name": "ScheduleNameGoesHere332204b5-debe-4348-a5c7-6357457189f2"
},
"runOn": null,
"parameters": {
"jobscheduletag01": "jobschedulevalue01",
"jobscheduletag02": "jobschedulevalue02"
}
}
}
Definitions
Name | Description |
---|---|
Error |
Error response of an operation failure |
Job |
Definition of the job schedule. |
Job |
The parameters supplied to the create job schedule operation. |
Runbook |
The runbook property associated with the entity. |
Schedule |
The schedule property associated with the entity. |
ErrorResponse
Error response of an operation failure
Name | Type | Description |
---|---|---|
code |
string |
Error code |
message |
string |
Error message indicating why the operation failed. |
JobSchedule
Definition of the job schedule.
Name | Type | Description |
---|---|---|
id |
string |
Gets the id of the resource. |
name |
string |
Gets the name of the variable. |
properties.jobScheduleId |
string |
Gets or sets the id of job schedule. |
properties.parameters |
object |
Gets or sets the parameters of the job schedule. |
properties.runOn |
string |
Gets or sets the hybrid worker group that the scheduled job should run on. |
properties.runbook |
Gets or sets the runbook. |
|
properties.schedule |
Gets or sets the schedule. |
|
type |
string |
Resource type |
JobScheduleCreateParameters
The parameters supplied to the create job schedule operation.
Name | Type | Description |
---|---|---|
properties.parameters |
object |
Gets or sets a list of job properties. |
properties.runOn |
string |
Gets or sets the hybrid worker group that the scheduled job should run on. |
properties.runbook |
Gets or sets the runbook. |
|
properties.schedule |
Gets or sets the schedule. |
RunbookAssociationProperty
The runbook property associated with the entity.
Name | Type | Description |
---|---|---|
name |
string |
Gets or sets the name of the runbook. |
ScheduleAssociationProperty
The schedule property associated with the entity.
Name | Type | Description |
---|---|---|
name |
string |
Gets or sets the name of the Schedule. |