0

I am new to Jenkins. I have a job when I went in to configuration I see that it's scheduled to run at 12:25:03 AM EDT

Build Schedule : H H(0-3) * * *

I want to change that to run at 8:15 AM EDT, how can I do that ?

If I want to run more than once for example 8:15 AM EDT and 2:15 PM EDT how can I do that ?

What does that H H(0-3) * * * stands for ?

msbyuva
  • 3,467
  • 13
  • 63
  • 87

1 Answers1

1

To launch your job at 8:15am and 2:15am, you can use the following expression:

15 2,8 * * *

You can use the following web site to test your cron expressions: http://cron.schlitt.info/

H H(0,3) * * * means your job will be launch between midnight and 3am every day.

The Jenkins documentation is very detailed on this subject (accessible from your job with the help button).

Another useful link : How to schedule jobs in Jenkins?

Community
  • 1
  • 1
Bruno Lavit
  • 10,184
  • 2
  • 32
  • 38
  • thanks Burno, I scheduled as 15 14,8 * * * but it suggested Spread load evenly by using ‘H 14,8 * * *’ rather than ‘15 14,8 * * *’ so then I changed to H 14,8 * * * it show now Help for feature: Schedule Would last have run at Thursday, March 17, 2016 8:25:51 AM EDT; would next run at Thursday, March 17, 2016 2:25:51 PM EDT., how ca it pick up time as :25:51 ?? – msbyuva Mar 17 '16 at 15:42
  • H is more flexible than a fixed hour or minutes. If Jenkins is overloaded, it will delay your job of a few seconds or minutes. – Bruno Lavit Mar 17 '16 at 15:44
  • Copied from the Jenkins doc --> For example, using 0 0 * * * for a dozen daily jobs will cause a large spike at midnight. In contrast, using H H * * * would still execute each job once a day, but not all at the same time, better using limited resources. – Bruno Lavit Mar 17 '16 at 15:45