Shutdown Windows Agent when Idle

Hi everyone,

I am using “Launch agent by connection it to the controller” to connect a Windows OS agent which hosted on Azure. When I set the Availability as “Bring this agent online when in demand, and take offline when idle”, it doesn’t working.

I am using az cli to resolve the start action, but cannot deal with machine offline when idle.

Its work fine on Linux, the same configuration can perform fully automated, not require custom action on starting up and shutting down.

Anyone can please advice? Many thanks!

The Availability Bring this agent online when in demand, and take offline when idle can’t work for inbound agents because Jenkins is not able to control the process running on the agent.
Are you also using Launch agent by connection it to the controller on the Linux agent?

Yes, i used the same launch method on Linux. If use SSH to launch?

When you use ssh then you have a different way to start the agent. With ssh the controller can start and stop the agent process by itself.