Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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
  • No labels