Hello, During night, I want to launch a jenkins job that makes all backups for all the ressources (database, svn, etc....) that all other jenkins jobs use.
So, I have to make sure that this job is running absolutely alone. I already have tenths of jobs configured and I don't want to change something in their config because of this new backup job. What is the best way to achieve that ? My current plan: a) schedule the job at 02:00 am b) make the job reduce the number of executors to 1 for itself only c) query the queue and executors to wait that all other job finish d) run the backup activities e) restore the executors to their original number f) finish the backup job Questions: 1) what is the correct way (API) to reduce the executors programmatically ? 2) is there anything better than my plan ? (I studied Lock&Latch and Throttle plugin but they don't seem appropriate for that purpose) Thanks a lot in advance ! regards didier