Our Jenkins performs massive integration tests. The longer the jenkins is running, the longer the tests need. Thus we restart the Jenkins server every night via cronjob. Meanwhile the build queue is too long to be finished and the currently running job is canceled and a fail. That's ugly. I found the Safe Restart Plugin, but that waits for empty build queues. Ideally I would have a job which could be priorized to also reboot at every wanted time during the day. This job needs to perform the reboot as the safe restart plugin would do if no jobs where left.
5
votes
You might be able to use this to throttle back to 0 the executors before a reboot wiki.jenkins-ci.org/display/JENKINS/Slave+Squatter+Plugin
– KeepCalmAndCarryOn
Do you mean by extending the plugin or by it's default capabilities?
– jan
As it stands you can use cron like syntax to set the executors to zero at a given time then restart jenkins at a time after that as you currently are. I think I would investigate spreading the load on the server by adding a slave node or two to jenkins
– KeepCalmAndCarryOn