Is the Agent Pool Maintenance script customizable?

2020-06-04T04:05:10.327+00:00

For our largest pool, 500-700 virtual machines, we have enabled the Maintenance Job.

Are we able to edit this maintenance script that we enabled?

We have noticed that machines with an uptime of more than 60 days start having Agent / Azure Task failures that cause failures in builds until the virtual machine is rebooted. We would like to add an uptime check to the maintenance job's script and reboot machines as part of this operation.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,842 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vahid Ghafarpour 17,700 Reputation points
    2023-09-09T13:51:04.0833333+00:00

    You can create an Azure Automation Runbook that periodically checks the uptime of VMs in your scale set and reboots them if they exceed a certain threshold. Azure Automation allows you to run PowerShell or Python scripts on a schedule or in response to specific triggers.

    0 comments No comments