Schedule - Create Or Update
Create a schedule.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}?api-version=2023-11-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
automation
|
path | True |
string |
The name of the automation account. |
resource
|
path | True |
string |
Name of an Azure Resource group. Regex pattern: |
schedule
|
path | True |
string |
The schedule name. |
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 |
---|---|---|---|
name | True |
string |
Gets or sets the name of the Schedule. |
properties.frequency | True |
Gets or sets the frequency of the schedule. |
|
properties.startTime | True |
string |
Gets or sets the start time of the schedule. |
properties.advancedSchedule |
Gets or sets the AdvancedSchedule. |
||
properties.description |
string |
Gets or sets the description of the schedule. |
|
properties.expiryTime |
string |
Gets or sets the end time of the schedule. |
|
properties.interval |
|
Gets or sets the interval of the schedule. |
|
properties.timeZone |
string |
Gets or sets the time zone of the schedule. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
201 Created |
Created |
|
Other Status Codes |
Conflict |
|
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 or update a schedule
Sample request
PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule?api-version=2023-11-01
{
"name": "mySchedule",
"properties": {
"description": "my description of schedule goes here",
"startTime": "2017-03-27T17:28:57.2494819Z",
"expiryTime": "2017-04-01T17:28:57.2494819Z",
"interval": 1,
"frequency": "Hour",
"advancedSchedule": {}
}
}
Sample response
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule",
"name": "mySchedule",
"properties": {
"description": "my description of schedule goes here",
"startTime": "2017-03-27T17:28:00+00:00",
"startTimeOffsetMinutes": 0,
"expiryTime": "2017-04-01T17:28:00+00:00",
"expiryTimeOffsetMinutes": 0,
"isEnabled": true,
"nextRun": "2017-03-27T17:28:00+00:00",
"nextRunOffsetMinutes": 0,
"interval": 1,
"frequency": "Hour",
"creationTime": "2017-03-27T16:59:22.697+00:00",
"lastModifiedTime": "2017-03-27T16:59:22.697+00:00",
"timeZone": "UTC"
}
}
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule",
"name": "mySchedule",
"properties": {
"description": "my description of schedule goes here",
"startTime": "2017-03-27T17:28:00+00:00",
"startTimeOffsetMinutes": 0,
"expiryTime": "2017-04-01T17:28:00+00:00",
"expiryTimeOffsetMinutes": 0,
"isEnabled": true,
"nextRun": "2017-03-27T17:28:00+00:00",
"nextRunOffsetMinutes": 0,
"interval": 1,
"frequency": "Hour",
"creationTime": "2017-03-27T16:59:22.697+00:00",
"lastModifiedTime": "2017-03-27T16:59:22.697+00:00",
"timeZone": "UTC"
}
}
Definitions
Name | Description |
---|---|
Advanced |
The properties of the create Advanced Schedule. |
Advanced |
The properties of the create advanced schedule monthly occurrence. |
Error |
Error response of an operation failure |
Schedule |
Definition of the schedule. |
Schedule |
The parameters supplied to the create or update schedule operation. |
Schedule |
Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday. |
Schedule |
Gets or sets the frequency of the schedule. |
AdvancedSchedule
The properties of the create Advanced Schedule.
Name | Type | Description |
---|---|---|
monthDays |
integer[] |
Days of the month that the job should execute on. Must be between 1 and 31. |
monthlyOccurrences |
Occurrences of days within a month. |
|
weekDays |
string[] |
Days of the week that the job should execute on. |
AdvancedScheduleMonthlyOccurrence
The properties of the create advanced schedule monthly occurrence.
Name | Type | Description |
---|---|---|
day |
Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday. |
|
occurrence |
integer |
Occurrence of the week within the month. Must be between 1 and 5 |
ErrorResponse
Error response of an operation failure
Name | Type | Description |
---|---|---|
code |
string |
Error code |
message |
string |
Error message indicating why the operation failed. |
Schedule
Definition of the schedule.
Name | Type | Default value | Description |
---|---|---|---|
id |
string |
Fully qualified resource Id for the resource |
|
name |
string |
The name of the resource |
|
properties.advancedSchedule |
Gets or sets the advanced schedule. |
||
properties.creationTime |
string |
Gets or sets the creation time. |
|
properties.description |
string |
Gets or sets the description. |
|
properties.expiryTime |
string |
Gets or sets the end time of the schedule. |
|
properties.expiryTimeOffsetMinutes |
number |
Gets or sets the expiry time's offset in minutes. |
|
properties.frequency |
Gets or sets the frequency of the schedule. |
||
properties.interval |
|
Gets or sets the interval of the schedule. |
|
properties.isEnabled |
boolean |
False |
Gets or sets a value indicating whether this schedule is enabled. |
properties.lastModifiedTime |
string |
Gets or sets the last modified time. |
|
properties.nextRun |
string |
Gets or sets the next run time of the schedule. |
|
properties.nextRunOffsetMinutes |
number |
Gets or sets the next run time's offset in minutes. |
|
properties.startTime |
string |
Gets or sets the start time of the schedule. |
|
properties.startTimeOffsetMinutes |
number |
Gets the start time's offset in minutes. |
|
properties.timeZone |
string |
Gets or sets the time zone of the schedule. |
|
type |
string |
The type of the resource. |
ScheduleCreateOrUpdateParameters
The parameters supplied to the create or update schedule operation.
Name | Type | Description |
---|---|---|
name |
string |
Gets or sets the name of the Schedule. |
properties.advancedSchedule |
Gets or sets the AdvancedSchedule. |
|
properties.description |
string |
Gets or sets the description of the schedule. |
properties.expiryTime |
string |
Gets or sets the end time of the schedule. |
properties.frequency |
Gets or sets the frequency of the schedule. |
|
properties.interval |
|
Gets or sets the interval of the schedule. |
properties.startTime |
string |
Gets or sets the start time of the schedule. |
properties.timeZone |
string |
Gets or sets the time zone of the schedule. |
ScheduleDay
Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday.
Name | Type | Description |
---|---|---|
Friday |
string |
|
Monday |
string |
|
Saturday |
string |
|
Sunday |
string |
|
Thursday |
string |
|
Tuesday |
string |
|
Wednesday |
string |
ScheduleFrequency
Gets or sets the frequency of the schedule.
Name | Type | Description |
---|---|---|
Day |
string |
|
Hour |
string |
|
Minute |
string |
The minimum allowed interval for Minute schedules is 15 minutes. |
Month |
string |
|
OneTime |
string |
|
Week |
string |