Automation account PowerShell runbook taking wrong time

Apurva Pathak 845 Reputation points
2023-10-20T16:26:19.62+00:00

Hi folks,

I am stuck with an issue with Azure Automation account wherein I am using a PowerShell runbook to automate reboot for some servers. I've scheduled the runbooks to run at 12:05 AM UK Time but scripts are running ~1 hour behind schedule.

I've set some variables in script to call out the time when script is being run, and I am retrieving the output in the runbooks result, there I got to know that script is running on some different time and not on the scheduled timings.

Runbook schedule: User's image

Runbook Log and script runtime output:User's image

Piece of code to retrieve the time during runtime:User's image

Any help to this would be appreciated.

Thanks in advance!

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.