Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you exclude a timeframe in a Jenkins build schedule?

Tags:

I currently have a Jenkins job that is scheduled to run every 30 mins every day. It is configured as this: H/30 * * * *

I'd like to also tell the scheduler to run every 30 mins except from 2-3am. Is this possible? I can't seem to find exclusions in the schedule documentation.

like image 706
Dave Avatar asked May 06 '16 18:05

Dave


1 Answers

I think I figured this one out after all.

H/30 0,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 * * *

You need to explicitly set the hours by which you want the job to run, so in the csv list add all hours, except for 2 to keep tests from running between 2am and 2:59am

like image 118
Dave Avatar answered Oct 11 '22 12:10

Dave