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=2024-10-23
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
automation
|
path | True |
string |
The name of the automation account. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
schedule
|
path | True |
string |
The schedule name. |
|
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
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 (date-time) |
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 (date-time) |
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 |
Resource 'Schedule' update operation succeeded |
|
| 201 Created |
Resource 'Schedule' create operation succeeded |
|
| Other Status Codes |
The request conflicts with the current state of the server. |
|
| Other Status Codes |
An unexpected error response. |
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/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule?api-version=2024-10-23
{
"name": "mySchedule",
"properties": {
"description": "my description of schedule goes here",
"advancedSchedule": {},
"expiryTime": "2017-04-01T17:28:57.2494819Z",
"frequency": "Hour",
"interval": 1,
"startTime": "2017-03-27T17:28:57.2494819Z"
}
}
Sample response
{
"name": "mySchedule",
"id": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule",
"properties": {
"description": "my description of schedule goes here",
"creationTime": "2017-03-27T16:59:22.697+00:00",
"expiryTime": "2017-04-01T17:28:00+00:00",
"expiryTimeOffsetMinutes": 0,
"frequency": "Hour",
"interval": 1,
"isEnabled": true,
"lastModifiedTime": "2017-03-27T16:59:22.697+00:00",
"nextRun": "2017-03-27T17:28:00+00:00",
"nextRunOffsetMinutes": 0,
"startTime": "2017-03-27T17:28:00+00:00",
"startTimeOffsetMinutes": 0,
"timeZone": "UTC"
}
}
{
"name": "mySchedule",
"id": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule",
"properties": {
"description": "my description of schedule goes here",
"creationTime": "2017-03-27T16:59:22.697+00:00",
"expiryTime": "2017-04-01T17:28:00+00:00",
"expiryTimeOffsetMinutes": 0,
"frequency": "Hour",
"interval": 1,
"isEnabled": true,
"lastModifiedTime": "2017-03-27T16:59:22.697+00:00",
"nextRun": "2017-03-27T17:28:00+00:00",
"nextRunOffsetMinutes": 0,
"startTime": "2017-03-27T17:28:00+00:00",
"startTimeOffsetMinutes": 0,
"timeZone": "UTC"
}
}
Definitions
| Name | Description |
|---|---|
|
Advanced |
The properties of the create Advanced Schedule. |
|
Advanced |
The properties of the create advanced schedule monthly occurrence. |
|
created |
The type of identity that created the resource. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
| 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. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
AdvancedSchedule
The properties of the create Advanced Schedule.
| Name | Type | Description |
|---|---|---|
| monthDays |
integer[] (int32) |
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 (int32) |
Occurrence of the week within the month. Must be between 1 and 5 |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
Schedule
Definition of the schedule.
| Name | Type | Description |
|---|---|---|
| id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| name |
string |
The name of the resource |
| properties.advancedSchedule |
Gets or sets the advanced schedule. |
|
| properties.creationTime |
string (date-time) |
Gets or sets the creation time. |
| properties.description |
string |
Gets or sets the description. |
| properties.expiryTime |
string (date-time) |
Gets or sets the end time of the schedule. |
| properties.expiryTimeOffsetMinutes |
number (double) |
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 |
Gets or sets a value indicating whether this schedule is enabled. |
| properties.lastModifiedTime |
string (date-time) |
Gets or sets the last modified time. |
| properties.nextRun |
string (date-time) |
Gets or sets the next run time of the schedule. |
| properties.nextRunOffsetMinutes |
number (double) |
Gets or sets the next run time's offset in minutes. |
| properties.startTime |
string (date-time) |
Gets or sets the start time of the schedule. |
| properties.startTimeOffsetMinutes |
number (double) |
Gets the start time's offset in minutes. |
| properties.timeZone |
string |
Gets or sets the time zone of the schedule. |
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
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 (date-time) |
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 (date-time) |
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.
| Value | Description |
|---|---|
| Monday |
Monday |
| Tuesday |
Tuesday |
| Wednesday |
Wednesday |
| Thursday |
Thursday |
| Friday |
Friday |
| Saturday |
Saturday |
| Sunday |
Sunday |
ScheduleFrequency
Gets or sets the frequency of the schedule.
| Value | Description |
|---|---|
| OneTime |
OneTime |
| Day |
Day |
| Hour |
Hour |
| Week |
Week |
| Month |
Month |
| Minute |
The minimum allowed interval for Minute schedules is 15 minutes. |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |