Quantcast

Notifying when a job hasn't run for a set period

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Notifying when a job hasn't run for a set period

Chemmo
Hey,

Is there a plugin/other way to detect if a job hasn't run for (say) a day. We have a remote trigger on one of our jobs which would be handy to know if it hasn't run recently.

Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Notifying when a job hasn't run for a set period

Mark Waite
Maybe you could use the XML API to query the time stamp of the build in an external script?  

For example, I can see the time stamps (in XML) of all the builds for the job named "MyJenkinsJob" job with this syntax:

http://localhost:8080/job/MyJenkinsJob/api/xml?tree=builds[timestamp]

You can learn more about the API by appending /api to most Jenkins URLs.

Mark Waite


From: Chemmo <[hidden email]>
To: [hidden email]
Sent: Friday, July 27, 2012 1:46 AM
Subject: Notifying when a job hasn't run for a set period

Hey,

Is there a plugin/other way to detect if a job hasn't run for (say) a day. We have a remote trigger on one of our jobs which would be handy to know if it hasn't run recently.

Thanks


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Notifying when a job hasn't run for a set period

Jacob Robertson
This isn't quite what you're asking for, and I don't actually know how the RSS feeds work, but you can create a View that only shows you exactly what you want to see, and then maybe subscribe to that view's RSS feed?  If you use View Job Filters you can create a view with exactly the jobs and conditions you want.  We have a view for all jobs that haven't run in a certain amount of time, and that helps us to know which jobs have fallen off the wagon and need some attention.

On Fri, Jul 27, 2012 at 7:16 AM, Mark Waite <[hidden email]> wrote:
Maybe you could use the XML API to query the time stamp of the build in an external script?  

For example, I can see the time stamps (in XML) of all the builds for the job named "MyJenkinsJob" job with this syntax:


You can learn more about the API by appending /api to most Jenkins URLs.

Mark Waite


From: Chemmo <[hidden email]>
To: [hidden email]
Sent: Friday, July 27, 2012 1:46 AM
Subject: Notifying when a job hasn't run for a set period

Hey,

Is there a plugin/other way to detect if a job hasn't run for (say) a day. We have a remote trigger on one of our jobs which would be handy to know if it hasn't run recently.

Thanks



Loading...