Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Display timer triggers

This scripts displays the timer triggers for all the jobs in order to better arrange them.

import hudson.model.*
import hudson.triggers.*

for(item in Hudson.instance.items) {
	for(trigger in item.triggers.values()) {
		if(trigger instanceof TimerTrigger) {
			println("--- Timer trigger for " + item.name + " ---")
			println(trigger.spec + '\n')
		}
	}
}

Sample ouput produced:

--- Timer trigger for LIC-01-BuildXnetWebApp ---
# from Monday to Friday, at 6:00am
0 6 * * 1,2,3,4,5

--- Timer trigger for PTF-01-BuildXnetWebApp ---
# from Monday to Friday, at 5:00am
0 5 * * 1,2,3,4,5

--- Timer trigger for WRH-01-BuildXnetWebApp ---
# from Monday to Friday, at 7:00am
0 7 * * 1,2,3,4,5

--- Timer trigger for XNT-01-BuildCore ---
# from Monday to Friday, at 5:00am
0 5 * * 1,2,3,4,5

Back to the top