Did anyone has any idea how to trigger Jenkins build every 50 days?

77 views
Skip to first unread message

reddy yerapa

unread,
Jan 18, 2017, 11:54:12 PM1/18/17
to Jenkins Users
My use case is to trigger a build in Jenkins every 50 days. I know it uses a cron expression, I am not able to find the exact cron expression.

Please help me if anyone has used it or any idea is also helpful

Thanks

Victor Martinez

unread,
Jan 19, 2017, 2:01:57 AM1/19/17
to Jenkins Users
Have you tried to look for how to run a cron every XX days on Google?
I've found some references in StackOverflow
- http://stackoverflow.com/questions/8699075/how-to-set-cron-job-for-every-45-days

Cheers

reddy yerapa

unread,
Jan 19, 2017, 10:17:29 PM1/19/17
to Jenkins Users
Thanks for your reply

I tried that but it's not working out

reddy yerapa

unread,
Jan 19, 2017, 10:17:30 PM1/19/17
to Jenkins Users

reddy yerapa

unread,
Jan 19, 2017, 10:23:40 PM1/19/17
to Jenkins Users

Victor Martinez

unread,
Jan 20, 2017, 6:34:35 AM1/20/17
to Jenkins Users
I just tried the above 45 days cron example and Jenkins max time is about 30/31 days so... 


Uhm, I have not found any issues about this. It seems "This field follows the syntax of cron (with minor differences)" this is one of the minor differences. Maybe someone else can come up with some other idea. Other than that, you could just use some flag token and then check whether since the previous build and the current one there was already 50 days difference, by running that job on nightly basis and if so then trigger either another job with those details.

Cheers
Reply all
Reply to author
Forward
0 new messages