Azure Powershell runbook, scheduled to run every 1h. The script runs "Invoke-AzVMRunCommand" to call a Powershell script on remote VM locally.
The problem - sometimes it runs longer than 1h and overlaps with next in the schedule, and the second run fails with an error related to "Invoke-AzVMRunCommand" : "Run command extension execution is in progress. Please wait for completion before invoking a run command."
The question - how to query if the runbook job is currently running. We can not change schedule.
thank you!