About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
powershell_heavy
⚠️
windows_tools
⚠️
missing_linux_example
⚠️
windows_first
Summary:
The documentation page demonstrates a strong Windows bias. All command-line examples use PowerShell cmdlets (Az modules), which are native to Windows and only more recently available on other platforms. There are no examples using Azure CLI, Bash, or other Linux-native tools. The documentation refers exclusively to PowerShell for scripting and automation, and the structure of the page presents PowerShell options before any mention of cross-platform alternatives. This approach may alienate Linux users or those who prefer non-PowerShell workflows.
Recommendations:
- Add equivalent Azure CLI examples for all PowerShell cmdlet examples, as Azure CLI is cross-platform and widely used on Linux.
- Explicitly mention that PowerShell Core and Az modules are available on Linux/macOS, and provide installation guidance or links.
- Where possible, provide Bash script examples or note how to use REST API calls for schedule management.
- Reorganize sections so that cross-platform tools (Azure CLI, REST API) are presented alongside or before Windows-centric tools.
- Include a table or section comparing PowerShell and Azure CLI commands for common schedule management tasks.
- Clarify in the introduction that all examples are cross-platform where applicable, or clearly label those that are Windows-specific.
Create pull request
Flagged Code Snippets
## Schedule runbooks to run more frequently
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:
* 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.
* 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.
## Disable a schedule
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.
### Disable a schedule from the Azure portal
1. In your Automation account, on the left-hand pane select **Schedules** under **Shared Resources**.
1. Select the name of a schedule to open the details pane.
1. Change **Enabled** to **No**.
> [!NOTE]
> 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.
### Disable a schedule with PowerShell
Use the [Set-AzAutomationSchedule](/powershell/module/Az.Automation/Set-AzAutomationSchedule) cmdlet to change the properties of an existing schedule. To disable the schedule, specify False for the `IsEnabled` parameter.
The following example shows how to disable a schedule for a runbook by using an Azure Resource Manager cmdlet.
## Remove a schedule
When you're ready to remove your schedules, you can either use the Azure portal or PowerShell. Remember that you can only remove a schedule that has been disabled as described in the previous section.
### Remove a schedule using the Azure portal
1. In your Automation account, on the left-hand pane select **Schedules** under **Shared Resources**.
2. Select the name of a schedule to open the details pane.
3. Click **Delete**.
### Remove a schedule with PowerShell
You can use the `Remove-AzAutomationSchedule` cmdlet as shown below to delete an existing schedule.
Edit the following parameter values and save the template as a JSON file:
* Job schedule object name: A GUID (Globally Unique Identifier) is used as the name of the job schedule object.
>[!IMPORTANT]
> For each job schedule deployed with an ARM template, the GUID must be unique. Even if you're rescheduling an existing schedule, you'll need to change the GUID. This applies even if you've previously deleted an existing job schedule that was created with the same template. Reusing the same GUID results in a failed deployment.</br></br>
> There are services online that can generate a new GUID for you, such as this [Free Online GUID Generator](https://guidgenerator.com/).
* Schedule name: Represents the name of the Automation job schedule that will be linked to the specified runbook.
* Runbook name: Represents the name of the Automation runbook the job schedule is to be associated with.
Once the file has been saved, you can create the runbook job schedule with the following PowerShell command. The command uses the `TemplateFile` parameter to specify the path and filename of the template.
## Link a schedule to a runbook
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.
### Link a schedule to a runbook with the Azure portal
1. In the Azure portal, from your automation account, select **Runbooks** under **Process Automation**.
1. Select the name of the runbook to schedule.
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.
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.
### Link a schedule to a runbook with PowerShell
Use the [Register-AzAutomationScheduledRunbook](/powershell/module/Az.Automation/Register-AzAutomationScheduledRunbook) 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](../start-runbooks.md).
The following example shows how to link a schedule to a runbook by using an Azure Resource Manager cmdlet with parameters.