You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/automation/automation-solution-vm-management-config.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,7 +120,7 @@ When you run the **AutoStop_CreateAlert_Parent** runbook, it verifies that the t
120
120
121
121
### To target the autostop action to a list of VMs
122
122
123
-
1. Create a new [Schedule](shared-resources/schedules.md#creating-a-schedule) and link it to the **AutoStop_CreateAlert_Parent** runbook, adding a comma-separated list of VM names to the `VMList` parameter.
123
+
1. Create a new [Schedule](shared-resources/schedules.md#create-a-schedule) and link it to the **AutoStop_CreateAlert_Parent** runbook, adding a comma-separated list of VM names to the `VMList` parameter.
124
124
125
125
2. Optionally, if you want to exclude some VMs from the auto shutdown, you can add a comma-separated list of VM names to the `External_ExcludeVMNames` variable.
Copy file name to clipboardExpand all lines: articles/automation/shared-resources/schedules.md
+37-38Lines changed: 37 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: Manage schedules in Azure Automation
3
-
description: Automation schedules are used to schedule runbooks in Azure Automation to start automatically. Describes how to create and manage a schedule in so that you can automatically start a runbook at a particular time or on a recurring schedule.
3
+
description: Learn how to create and manage a schedule in Azure Automation so that you can automatically start a runbook at a particular time or on a recurring schedule.
4
4
services: automation
5
5
ms.service: automation
6
6
ms.subservice: shared-capabilities
@@ -12,15 +12,15 @@ manager: carmonm
12
12
---
13
13
# Manage schedules in Azure Automation
14
14
15
-
To schedule a runbook in Azure Automation to start at a specified time, you link it to one or more schedules. A schedule can be configured to either run once or on a reoccurring hourly or daily schedule for runbooks in the Azure portal. You can also schedule them for weekly, monthly, specific days of the week or days of the month, or a particular day of the month. A runbook can be linked to multiple schedules, and a schedule can have multiple runbooks linked to it.
15
+
To schedule a runbook in Azure Automation to start at a specified time, you link it to one or more schedules. A schedule can be configured to either run once or on a recurring hourly or daily schedule for runbooks in the Azure portal. You can also schedule them for weekly, monthly, specific days of the week or days of the month, or a particular day of the month. A runbook can be linked to multiple schedules, and a schedule can have multiple runbooks linked to it.
16
16
17
17
> [!NOTE]
18
-
> Schedules do not currently support Azure Automation DSC configurations.
18
+
> Schedules don't currently support Azure Automation DSC configurations.
19
19
20
20
>[!NOTE]
21
-
>This article has been updated to use the new Azure PowerShell Az module. You can still use the AzureRM module, which will continue to receive bug fixes until at least December 2020. To learn more about the new Az module and AzureRM compatibility, see [Introducing the new Azure PowerShell Az module](https://docs.microsoft.com/powershell/azure/new-azureps-module-az?view=azps-3.5.0). For Az module installation instructions on your Hybrid Runbook Worker, see [Install the Azure PowerShell Module](https://docs.microsoft.com/powershell/azure/install-az-ps?view=azps-3.5.0). For your Automation account, you can update your modules to the latest version using [How to update Azure PowerShell modules in Azure Automation](../automation-update-azure-modules.md).
21
+
>This article has been updated to use the new Azure PowerShell Az module. You can still use the AzureRM module, which will continue to receive bug fixes until at least December 2020. To learn more about the new Az module and AzureRM compatibility, see [Introducing the new Azure PowerShell Az module](https://docs.microsoft.com/powershell/azure/new-azureps-module-az?view=azps-3.5.0). For Az module installation instructions on your Hybrid Runbook Worker, see [Install the Azure PowerShell module](https://docs.microsoft.com/powershell/azure/install-az-ps?view=azps-3.5.0). For your Automation account, you can update your modules to the latest version by using [How to update Azure PowerShell modules in Azure Automation](../automation-update-azure-modules.md).
22
22
23
-
## PowerShell Cmdlets
23
+
## PowerShell cmdlets
24
24
25
25
The cmdlets in the following table are used to create and manage schedules with PowerShell in Azure Automation. They ship as part of the [Azure PowerShell module](/powershell/azure/overview).
26
26
@@ -34,37 +34,37 @@ The cmdlets in the following table are used to create and manage schedules with
34
34
|[Set-AzAutomationSchedule](https://docs.microsoft.com/powershell/module/Az.Automation/Set-AzAutomationSchedule?view=azps-3.7.0)|Sets the properties for an existing schedule. |
35
35
|[Unregister-AzAutomationScheduledRunbook](https://docs.microsoft.com/powershell/module/Az.Automation/Unregister-AzAutomationScheduledRunbook?view=azps-3.7.0)|Dissociates a runbook from a schedule. |
36
36
37
-
## Creating a schedule
37
+
## Create a schedule
38
38
39
39
You can create a new schedule for runbooks in the Azure portal or with PowerShell.
40
40
41
41
> [!NOTE]
42
-
> Azure Automation uses the latest modules in your Automation account when a new scheduled job is run. To avoid impacting your runbooks and the processes they automate, you should first test any runbooks that have linked schedules with an Automation account dedicated for testing. This validates your scheduled runbooks continue to work correctly and if not, you can further troubleshoot and apply any changes required before migrating the updated runbook version to production.
43
-
> Your Automation account does not automatically get any new versions of modules unless you have updated them manually by selecting the [Update Azure Modules](../automation-update-azure-modules.md) option from the**Modules**.
42
+
> Azure Automation uses the latest modules in your Automation account when a new scheduled job is run. To avoid affecting your runbooks and the processes they automate, you should first test any runbooks that have linked schedules with an Automation account dedicated for testing. A test validates that your scheduled runbooks continue to work correctly. If you see a problem, you can troubleshoot and apply any changes required before you migrate the updated runbook version to production.
43
+
> Your Automation account doesn't automatically get any new versions of modules unless you've updated them manually by selecting the [Update Azure Modules](../automation-update-azure-modules.md) option from **Modules**.
44
44
45
45
### Create a new schedule in the Azure portal
46
46
47
-
1. In the Azure portal, from your automation account, select **Schedules** under the section **Shared Resources** on the left.
48
-
2. Click**Add a schedule** at the top of the page.
49
-
3. On the New schedule pane, type a name and optionally a description for the new schedule.
50
-
4. Select whether the schedule runs one time, or on a reoccurring schedule by selecting **Once** or **Recurring**. If you select **Once**, specify a start time and then click**Create**. If you select **Recurring**, specify a start time. For **Recur every**, select how often you want the runbook to repeat - by hour, day, week, or month.
51
-
1. If you select **week**, the days of the week are presented for you to choose from. Select as many days as you want. The first run of your schedule will happen on the first day selected after the start time. For example, to choose a weekend schedule, select Saturday and Sunday.
47
+
1. In the Azure portal, from your Automation account, select **Schedules** under the section **Shared Resources** on the left.
48
+
1. Select**Add a schedule** at the top of the page.
49
+
1. On the **New schedule** pane, enter a name and optionally enter a description for the new schedule.
50
+
1. Select whether the schedule runs one time or on a reoccurring schedule by selecting **Once** or **Recurring**. If you select **Once**, specify a start time and then select**Create**. If you select **Recurring**, specify a start time. For **Recur every**, select how often you want the runbook to repeat. Select by hour, day, week, or month.
51
+
1. If you select **Week**, the days of the week are presented for you to choose from. Select as many days as you want. The first run of your schedule will happen on the first day selected after the start time. For example, to choose a weekend schedule, select Saturday and Sunday.
2. If you select **month**, you're given different options. For the **Monthly occurrences** option, select either **Month days** or **Week days**. If you choose**Month days**, a calendar is shown that allows you to choose as many days as you want. If you choose a date such as the 31st that doesn't occur in the current month, the schedule won't run. If you want the schedule to run on the last day, choose**Yes** under **Run on last day of month**. If you choose**Week days**, the **Recur every** option is presented. Choose **First**, **Second**, **Third**, **Fourth**, or **Last**. Finally choose a day to repeat on.
55
+
2. If you select **Month**, you're given different options. For the **Monthly occurrences** option, select either **Month days** or **Week days**. If you select**Month days**, a calendar appears so that you can choose as many days as you want. If you choose a date such as the 31st that doesn't occur in the current month, the schedule won't run. If you want the schedule to run on the last day, select**Yes** under **Run on last day of month**. If you select**Week days**, the **Recur every** option appears. Choose **First**, **Second**, **Third**, **Fourth**, or **Last**. Finally, choose a day to repeat on.
56
56
57
57

58
58
59
-
5. When done click**Create**.
59
+
1. When you're finished, select**Create**.
60
60
61
61
### Create a new schedule with PowerShell
62
62
63
63
Use the [New-AzAutomationSchedule](https://docs.microsoft.com/powershell/module/Az.Automation/New-AzAutomationSchedule?view=azps-3.7.0) cmdlet to create schedules. You specify the start time for the schedule and the frequency it should run. The following examples show how to create many different schedule scenarios.
64
64
65
65
#### Create a one-time schedule
66
66
67
-
The following sample commands create a onetime schedule.
67
+
The following sample commands create a one-time schedule.
A runbook can be linked to multiple schedules, and a schedule can have multiple runbooks linked to it. If a runbook has parameters, then you can provide values for them. You must provide values for any mandatory parameters and may provide values for any optional parameters. These values are used each time the runbook is started by this schedule. You can attach the same runbook to another schedule and specify different parameter values.
115
+
A runbook can be linked to multiple schedules, and a schedule can have multiple runbooks linked to it. If a runbook has parameters, you can provide values for them. You must provide values for any mandatory parameters, and you also can provide values for any optional parameters. These values are used each time the runbook is started by this schedule. You can attach the same runbook to another schedule and specify different parameter values.
116
116
117
117
### Link a schedule to a runbook with the Azure portal
118
118
119
119
1. In the Azure portal, from your automation account, select **Runbooks** under **Process Automation**.
120
-
2. Click on the name of the runbook to schedule.
121
-
3. If the runbook isn't currently linked to a schedule, then you're offered the option to create a new schedule or link to an existing schedule.
122
-
4. If the runbook has parameters, you can select the option **Modify run settings (Default:Azure)** and the Parameters pane is presented. You can enter parameter information here.
120
+
1. Select the name of the runbook to schedule.
121
+
1. If the runbook isn't currently linked to a schedule, you're offered the option to create a new schedule or link to an existing schedule.
122
+
1. If the runbook has parameters, you can select the option **Modify run settings (Default:Azure)** and the **Parameters** pane appears. You can enter parameter information here.
123
123
124
124
### Link a schedule to a runbook with PowerShell
125
125
126
-
Use the [Register-AzAutomationScheduledRunbook](https://docs.microsoft.com/powershell/module/Az.Automation/Register-AzAutomationScheduledRunbook?view=azps-3.7.0) cmdlet to link a schedule. You can specify values for the runbook’s parameters with the Parameters parameter. For more information on specifying parameter values,
127
-
see [Starting a Runbook in Azure Automation](../automation-starting-a-runbook.md).
128
-
The following example shows how to link a schedule to a runbook using an Azure Resource Manager cmdlet with parameters.
126
+
Use the [Register-AzAutomationScheduledRunbook](https://docs.microsoft.com/powershell/module/Az.Automation/Register-AzAutomationScheduledRunbook?view=azps-3.7.0) cmdlet to link a schedule. You can specify values for the runbook’s parameters with the Parameters parameter. For more information on how to specify parameter values, see [Starting a Runbook in Azure Automation](../automation-starting-a-runbook.md).
127
+
The following example shows how to link a schedule to a runbook by using an Azure Resource Manager cmdlet with parameters.
The most frequent interval a schedule in Azure Automation can be configured for is one hour. If you require schedules to execute more frequently than that, there are two options:
141
+
The most frequent interval for which a schedule in Azure Automation can be configured is one hour. If you require schedules to run more frequently than that, there are two options:
143
142
144
-
* Create a [webhook](../automation-webhooks.md) for the runbook and use [Azure Logic Apps](../../logic-apps/logic-apps-overview.md) to call the webhook. Azure Logic Apps provides more fine-grained granularity when defining a schedule.
143
+
* Create a [webhook](../automation-webhooks.md) for the runbook, and use [Azure Logic Apps](../../logic-apps/logic-apps-overview.md) to call the webhook. Azure Logic Apps provides more fine-grained granularity to define a schedule.
145
144
146
-
* Create four schedules all starting within 15 minutes of each other running once every hour. This scenario allows the runbook to run every 15 minutes with the different schedules.
145
+
* Create four schedules that all start within 15 minutes of each other and run once every hour. This scenario allows the runbook to run every 15 minutes with the different schedules.
147
146
148
-
## Disabling a schedule
147
+
## Disable a schedule
149
148
150
-
When you disable a schedule, any runbook linked to it no longer runs on that schedule. You can manually disable a schedule or set an expiration time for schedules with a frequency when you create them. Once the expiration time is reached, the schedule is disabled.
149
+
When you disable a schedule, any runbook linked to it no longer runs on that schedule. You can manually disable a schedule or set an expiration time for schedules with a frequency when you create them. When the expiration time is reached, the schedule is disabled.
151
150
152
151
### Disable a schedule from the Azure portal
153
152
154
153
1. In your Automation account, select **Schedules** under **Shared Resources**.
155
-
2. Click the name of a schedule to open the details pane.
156
-
3. Change **Enabled** to **No**.
154
+
1. Select the name of a schedule to open the details pane.
155
+
1. Change **Enabled** to **No**.
157
156
158
157
> [!NOTE]
159
-
> If you want to disable a schedule that has a start time in the past, you must change the start date to a time in the future before saving it.
158
+
> If you want to disable a schedule that has a start time in the past, you must change the start date to a time in the future before you save it.
160
159
161
160
### Disable a schedule with PowerShell
162
161
163
162
Use the [Set-AzAutomationSchedule](https://docs.microsoft.com/powershell/module/Az.Automation/Set-AzAutomationSchedule?view=azps-3.7.0) cmdlet to change the properties of an existing schedule. To disable the schedule, specify False for the `IsEnabled` parameter.
164
163
165
-
The following example shows how to disable a schedule for a runbook using an Azure Resource Manager cmdlet.
164
+
The following example shows how to disable a schedule for a runbook by using an Azure Resource Manager cmdlet.
0 commit comments