Waman
Waman

Reputation: 1179

Trigger Jenkins job on even calender dates

I have 2 jobs one of which I would wish to run only on even calendar days like 2, 4, 6, 8 ... of a month & the other job should run only on odd days.

Any idea how to schedule this in Jenkins?

Thanks In Advance!

Upvotes: 0

Views: 888

Answers (1)

Cosaquee
Cosaquee

Reputation: 774

You can just use builtin option called poll scm in Jenkins job configuration page. You can specify cron like expression to tell Jenkins when it should poll you code repository and build your project.\

Syntax would look like this syntax taken from here :

# Will only run on odd days:
0 0 1-31/2 * * command

# Will only run on even days:
0 0 2-30/2 * * command

Upvotes: 1

Related Questions