Skip to content

Instantly share code, notes, and snippets.

@luanlmd
Last active October 8, 2021 12:36
Show Gist options
  • Save luanlmd/6243ea5567d81bb1030a562feafa609f to your computer and use it in GitHub Desktop.
Save luanlmd/6243ea5567d81bb1030a562feafa609f to your computer and use it in GitHub Desktop.
Clear Jenkins Queue
// Go TO JENKINS_HOST/script
// Paste and run:
import hudson.model.*
def queue = Hudson.instance.queue
println "Queue contains ${queue.items.length} items"
queue.clear()
println "Queue cleared"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment