Jesus Fernandez
Jesus Fernandez

Reputation: 570

how to task a job to trigger with 2 different cron in jenkins?

I have a jenkins job which I would like to be ran everyday at midnight and then Fridays at 18, I have tried this: triggers { cron('H 0 * * * \n H 18 * * 5') } but it does not seem to work so far so I end up creating another extra job for the friday run. Is there any way to actually do this in one job?

Upvotes: 1

Views: 535

Answers (1)

MaratC
MaratC

Reputation: 6869

Try this:

triggers { cron("""H 0 * * *
H 18 * * 5""") }

Upvotes: 2

Related Questions