Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jbontech/e132a57988bf5694adce7086c9adcf9a to your computer and use it in GitHub Desktop.
Save jbontech/e132a57988bf5694adce7086c9adcf9a to your computer and use it in GitHub Desktop.
Jenkins groovy script to print scheduling rules for all the jobs
import hudson.triggers.*;
for (item in Jenkins.instance.getItems(Project)) {
println("--- Scheduling for " + item.name + " ---")
def trigger = item.triggers.get(Jenkins.instance.getDescriptor(TimerTrigger.class));
if (trigger) {
println trigger.spec;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment