This post is a follow-up post that covered a brief introduction to Microsoft Azure Automation and can be found here.
Within this post, I will cover how to publish a workbook, schedule the execution of workbooks, enable detailed logging, and a quick view at the dashboard.
Azure Automation Schedule Jobs: The Steps
Scheduling the execution of a workbook (descriptively named Schedule in Microsoft Azure) requires that the workbook has been published, which is a flag. To publish a workbook within the Portal, open the Workbook, open the tab called AUTHOR, and click PUBLISH, which can be found at the bottom of the screen. Nothing special will happen at this point. The execution context of the script will stay the same. Therefore it’s’s important to note that there isn’t a sandbox-like environment where you can test Workbooks isolated from your Azure assets.
After publishing the Workbook, you will be able to alter and test a new version of the Workbook and publish this version when ready. I wish it were possible to compare the version of scripts and add notes for every publish version. The authoring experience is enjoyable. However, I prefer to build and pre-test my scripts locally, including the process of annotating changes and storing the Workbooks within a source repository.
Scheduling the execution of workbooks
Scheduling the execution of a workbook can be performed within the portal by opening the schedule tab of the workbook. Here you can create a new schedule or reuse an existing schedule. The schedule options are rather limited if you compare them with the SQL server scheduler or windows scheduler, as you can see below.
Note: At this point it’s even possible to link multiple schedules to a workbook. This in case the default scheduler options aren’t providing the desired choices or perhaps other special cases.
Windows Azure Automation Dashboards
Windows Azure Automation includes a beneficial dashboard to monitor the execution workbooks, including running and historical data. Important to know is that a Job is an instance of a workbook. Each job will walk through a predefined set of statuses before completion. The states are quite descriptive, as can be seen below.
• QUEUED
• RUNNING
• FAILED
• STOPPED
• SUSPENDED
• COMPLETED
You can open the dashboard on the Windows Azure Automation Account level or on an individual workbook. And also enables the option to execute a workbook directly (create a job) without the need for creating/linking a schedule. Ad Hoc Jobs are included within the job history.
A very welcome feature is the option to inspect the job history details; you can do this by clicking on one of the past jobs within the dashboard page.
Within the job details/summary page, you will be able to review the execution context and logged output in a flat format or as a stack trace as found on the HISTORY tab. This tab will also include the option to view the Runbook source used for this job.
Recent Comments