I posted a comment on the JIRA and read through Jenkins source code for a 
while, but did not find a way to do it.

I would have preferred a simple job that ran periodically and just adjusted 
the number of executors on each slave, but I came up with an alternate 
approach.

   - Increased the number of executors on slaves to the max that will be 
   needed
   - Created a new job 'hold_executor'
      - Scheduled to launch periodically
      - High priority via priority sorter plugin
      - Limited concurrent threads with throttle concurrent plugin, so a 
      minimum number of executors are always available for real work
      - Job runs a script to check for conditions
         - If executor should be disabled, the job sleeps while holding the 
         executor slot for a time period then checks again
         - If executor should be freed for real work, the job exits
      
Not as clean, but it meets my needs for now.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c4a4bfdb-f684-4906-ba1b-dfe90da43a6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to