@fhtino I understand you want to terminate scheduled jobs if it exceeds specified time. You can create PowerShell Script which retrieves the job information. For this, you can use Get-AzAutomationJob. Retrieve the difference between current time and start time and compare it to specified time. If it exceeds, then you can stop the job using Stop-AzAutomationJob or Suspend-AzAutomationJob.
How to set a runbook / job timeout?
fhtino
136
Reputation points
Hi, I have created a runbook and successfully scheduled it to run every day. Now, I would like to set a timeout on the runbook or scheduled job to kill my job in case it is still running after x minutes. Is it possible?
I know that I could do something inside the powershell script but I would prefer an external system that kill my job if its running time exceeded a value.