Linu
Linu

Reputation: 597

Schedule Jenkins Job every 2 and half Hour

I need to schedule a Jenkins job which need to build every 2 and half hour(every 150 minute). I have checked google but haven't find a useful link which help me with this, most of the links are referring to whole number hour's.

Also is it possible to run a Jenkins Job every 30 seconds and every 1 minute.

When I tried for every 1 minute */1 * * * * it was running for every 1 hour instead of 1 minute.

Any guidance on this will be very helpful.

Upvotes: 0

Views: 1721

Answers (2)

Sven-Eric Krüger
Sven-Eric Krüger

Reputation: 1317

You can use multiple lines of repeated/scheduled executions.

0 */5 * * *
30 2-23/5 * * *

First execution: By the beginning of every fifth hour.
0:00 5:00 10:00 15:00 20:00

Second execution: By the half of every fifth hour starting at 2:30am.
2:30 7:30 12:30 17:30 22:30

Upvotes: 2

Giovanni Patruno
Giovanni Patruno

Reputation: 763

this should work:

30 */2 * * *

Upvotes: 0

Related Questions