Every time a Runbook runs in Azure Automation a job is created. In Automation Workspace you can follow up on all jobs, whether they were started from Runbook Manager, Flow Designer, a Workflow or an Alias.

The list of jobs

Click the Jobs (clock) icon in the rail to open the list of jobs.

List of jobs

At the top you see the number of jobs in total, and how many are Active, Completed and Failed.

Use the Automation Account and Runbook filters to limit both the numbers and the list. Choosing an Automation Account narrows the Runbooks you can choose from. Use Search jobs to find a job by Runbook, Automation Account or job ID, and the status filter to narrow the list further. The newest jobs are shown first.

Notice: If you have opened the list by clicking a chart on the Dashboard, the list also has a time filter. Click Clear time filter to see all jobs.

Job details

Click a job to open it.

Job details

The job view shows:

  • The status of the job in ServiceNow and the status reported by Azure.
  • The Automation Account, where the job ran (Run on) and when it was created.
  • The Input submitted to the job.
  • The Output of the job, including errors and exceptions.
  • Extracted output variables: values found in JSON output. These are the values you can read with the Get output variable action in Flow Designer.

While a job is active, the view is refreshed every five seconds until the job has finished. If a refresh fails, click Refresh to try again. New output scrolls into view unless you have scrolled up to read earlier output.

Click Jobs to return to the list with your filters intact.

Jobs suspended by a Hybrid Worker

A Hybrid Worker can only take on a limited number of jobs at a time. When it has too many, Azure suspends the job with the message “Job was suspended as it exceeded the job limit for a Hybrid Worker”.

Automation App handles this automatically:

  • For PowerShell Workflow Runbooks, the job is set to Resuming in ServiceNow and Automation App asks Azure to resume it. A Flow waiting for the job keeps waiting. If the job is still suspended after about two minutes, it is set to Failed.
  • For other Runbook types, the job cannot be resumed and is set to Failed in ServiceNow. Azure still reports it as Suspended.

The job view shows both the ServiceNow status and the Azure status, the Hybrid Worker Group the job ran on, and when a resume was requested.

Notice: A resumed Workflow without checkpoints starts over from the beginning. Make sure your Runbook can safely run again. If jobs are often suspended, check the health and capacity of your Hybrid Workers. See Microsoft’s troubleshooting guide.

Resuming jobs requires an extra permission in Azure. See Microsoft Azure Setup.

When Azure is unavailable

If Azure is temporarily unavailable or throttles requests, active jobs are not failed. Automation App waits and checks the job again later. The job view shows the earliest time of the next check. Requests that change something in Azure, such as starting a job, are never repeated automatically.