- 19 Nov 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
Runbook
- Updated on 19 Nov 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
Introduction
Process automation in Azure Automation allows you to create and manage PowerShell, PowerShell Workflow, and graphical runbooks. Automation executes your runbooks based on the logic defined inside them. If a runbook is interrupted, it restarts at the beginning. Starting a runbook in Azure Automation creates a job, which is a single execution instance of the runbook.
Job history
The status of all runbook jobs can be found in the Job history section available for the corresponding Runbook resource.
Manage job operations
Users can perform the following operations from Job history for indivual (or) multiple runbook jobs:
- Start/Resume
- Stop
- Suspend
Optional Settings
Runbook jobs can be filtered by choosing the From date and To date along with any one of the following statuses:
- Completed
- Failed
- Stopped
- Suspended
- Blocked
- Disconnected
- New
- Resuming
- Running
Inline task
In Runbooks, a user can create a new runbook job from the source Runbook that is being explored.
The configuration created to run immediately can also be saved for future use in the Automated tasks section.
Inline task to create runbook jobs
A user can quickly create a runbook job in a Runbook resource by clicking the Create runbook job option. These runbook jobs can be executed with or without parameters.
The task status can be viewed by navigating to Automated tasks -> Task history.
Navigate to the Automated tasks section in Turbo360 to create a task with a more detailed configuration, schedule tasks to run at a specific time, or automate the task to run on the specified hours, days, and more.
Automated task
Consider a VM management scenario in a business enterprise where the organization is supposed to optimize the Virtual Machines usage by releasing the idle resources.
The task of releasing the idle Virtual Machine resources can be automated by defining a logic in a runbook and executing this job when the idle Virtual machine resources are identified.
The above example can be effectively handled by monitoring the VM status with error threshold set to VM stopped and configuring an automated task to create a runbook job containing a logic to delete the idle Virtual Machine.
Failure monitoring
The count of failed jobs can be tracked for a Runbook by following the below steps:
- Navigate to Runbook -> Monitoring
- Select Failed Jobs rule and configure the desired threshold values
- Click Save
Failure monitoring will be initiated once the rule is saved, and the monitoring state will be reflected after every monitoring cycle.