get date job got disabled

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

get date job got disabled


I'd like to know if there's a way to find out the date a job was disabled or how long it has been disabled for using groovy methods or any other methods really.

I'm writing a groovy housekeeping script that disables jobs not run for more than 3 months and then deletes the jobs disabled for a month. I have written the 1st part but am stuck now as I cannot work out how to get the date the job was disabled. I suppose I could always get my script to write the date it disables the job on a file and check it before deleting but that'd make things more complicated and time consuming.

Any suggestions much appreciated, cheers

I posted this to hudson ja by mistake, sorry for x posting etc..