Running a job exclusively

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Running a job exclusively

Garner Halloran
I have a job that I need to run exclusively called 'gettools' which updates all my scripts and exe's that all my other jobs use.

How can I make it so while it's running no other jobs will run and how can I make it so it will wait until all other jobs are done before it runs?

One way I thought to do this is change the number of executors to 1, queue the job, then when it's done, change the number of executors back to what it was.  But I don't know how to do that :)

Any idea on how to do that or perhaps another way to achieve my goal?

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Running a job exclusively

Michael Donohue
The locks-and-latches plugin provides exclusive locks, but that wouldn't do what you want, since your other dependent jobs would all be serialized by using one exclusive lock.   

The closest open feature request is HUDSON-1990 Shared and exclusive locking

-Michael
(646) 833-8884


On Thu, Feb 25, 2010 at 10:53 PM, Garner Halloran <[hidden email]> wrote:
I have a job that I need to run exclusively called 'gettools' which updates all my scripts and exe's that all my other jobs use.

How can I make it so while it's running no other jobs will run and how can I make it so it will wait until all other jobs are done before it runs?

One way I thought to do this is change the number of executors to 1, queue the job, then when it's done, change the number of executors back to what it was.  But I don't know how to do that :)

Any idea on how to do that or perhaps another way to achieve my goal?

Thanks!