Limit time a job can spend waiting for an executor in the Queue

28 views
Skip to first unread message

eborg...@nerdwallet.com

unread,
Oct 26, 2016, 7:02:44 PM10/26/16
to Jenkins Users
Hi,

We are using Jenkins with the GitHub Org Folder plugin to allow our users to leverage Jenkinsfiles for job definition.

One thing we have run into is when a user uses a label that does not exist for their node block then the job ends up waiting in the Build Queue forever.

We would like to cancel any job that has been in the queue for longer than X duration, but I can't find anything that seems to allow us to do this.

Does anyone have any advice/input on how we might cancel these jobs after a certain amount of time?

Thanks!

Baptiste Mathus

unread,
Oct 27, 2016, 3:22:10 PM10/27/16
to jenkins...@googlegroups.com
Hi,

Don't think such a plugin exists, but might be useful. Can't find something approaching in https://wiki.jenkins-ci.org/display/JENKINS/Plugins

Writing such a plugin should be very straightforward. Basically, with http://stackoverflow.com/a/12363390/345845 you have almost all the core feature you need to implement.
Alternatively, BTW, it should be easy to run that or close in a job every minute (granted you make sure it DOES run, that's the issue) in a system groovy script.

My 2 cents

--
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 jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/85c84b3f-07e6-4351-b83b-80206b907eba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages