Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Build Periodically - Does it support Multiple Schedules?

Tags:

jenkins

Does Jenkins Build Periodically support having 2 different schedules for a job at the same time?

H 22 * 7-12 1-5
H 20 20 1-6 *

The above is just an example. What it intends to do is,

H 22 * 7-12 1-5 : Run the job for last 6 months of a year every weekday around 10PM.
H 20 20 1-6 * : Run the same job for 1st 6 months of a year once a month on the 20th day around 8PM

UPDATE:

Trying this now at 6.40 PM
H 10 * * *
H 15 * * *

Gives,

Would last have run at Thursday, June 15, 2017 3:45:32 PM; would next run at Friday, June 16, 2017 10:59:32 AM.

Which seems to suggest both schedules were accepted by Jenkins!

like image 902
Nikhil Mahajan Avatar asked Jun 16 '17 12:06

Nikhil Mahajan


1 Answers

The Parameterized Scheduler plugin also adds the ability to have different parameters per schedule, so if you have something like a backup job that you want to run in multiple environments, you can have it scheduled three times in one night, once for each environment.

But otherwise, if you just need to have more than one schedule, adding one schedule per line should work just fine (with no extra plugins).

like image 118
geerlingguy Avatar answered Nov 16 '22 15:11

geerlingguy