Skip to content

Instantly share code, notes, and snippets.

@p0deje
Last active August 10, 2018 07:30
Show Gist options
  • Save p0deje/880880422df00f4d9031e8cff3808db8 to your computer and use it in GitHub Desktop.
Save p0deje/880880422df00f4d9031e8cff3808db8 to your computer and use it in GitHub Desktop.
Restart all dead executros on Jenkins (use from Script Console)
def deadExecutors = Jenkins.instance.computers.collect { c ->
c.executors.findAll { !it.isActive() }
}.flatten()
deadExecutors.each { it.doYank() }
@daniyel
Copy link

daniyel commented May 11, 2017

this script solved my problem as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment