user6084345
user6084345

Reputation: 53

Jenkins- how to schedule a build to run every 2 hours from 7 AM to 10PM on Monday through Friday

I'm looking for a way to run a Jenkins build every 2 hours, Monday through Friday only from 7 AM to 10PM. I got 7AM to 10PM and every 2 hours part down but how would I go about adding Monday through Friday to it?

Here is the schedule right now: H 07-22/2 * * *

If I add 1-5 to the above (1 for Monday and 5 for Friday), it gives me an error

" Invalid input: "H 07-22/2 * * * 1-5": line 1:16: expecting EOF, found ' ' "

Please help me out.

Thanks.

Upvotes: 1

Views: 6890

Answers (1)

Maxime Paquette
Maxime Paquette

Reputation: 141

You have too much element in your cron expression.

0 07-22/2 * * 1-5 instead of 0 07-22/2 * * * 1-5

Upvotes: 3

Related Questions