Jenkins Build Periodically - Schedule

Cameron Brown

I am looking to build periodically every 15 minutes. I have looked online and I am using this schedule: */15 * * * *

Jenkins is telling me to spread load evenly by using H/15 * * * * rather than */15 * * * *

Could someone tell me the difference between using H instead of *?

Avihoo Mamka

Yes. From the Build TriggersBuild periodicallySchedule inline help:

To allow periodically scheduled tasks to produce even load on the system, the symbol H (for “hash”) should be used wherever possible. 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.

The H symbol can be used with a range. For example, H H(0-7) * * * means some time between 12:00 AM (midnight) to 7:59 AM. You can also use step intervals with H, with or without ranges.

The H symbol can be thought of as a random value over a range, but it actually is a hash of the job name, not a random function, so that the value remains stable for any given project.

Beware that for the day of month field, short cycles such as */3 or H/3 will not work consistently near the end of most months, due to variable month lengths. For example, */3 will run on the 1st, 4th, …31st days of a long month, then again the next day of the next month. Hashes are always chosen in the 1-28 range, so H/3 will produce a gap between runs of between 3 and 6 days at the end of a month. (Longer cycles will also have inconsistent lengths but the effect may be relatively less noticeable.)

Empty lines and lines that start with # will be ignored as comments.

In addition, @yearly, @annually, @monthly, @weekly, @daily, @midnight, and @hourly are supported as convenient aliases. These use the hash system for automatic balancing. For example, @hourly is the same as H * * * * and could mean at any time during the hour. @midnight actually means some time between 12:00 AM and 2:59 AM.

Examples:

# every fifteen minutes (perhaps at :07, :22, :37, :52)
H/15 * * * *
# every ten minutes in the first half of every hour (three times, perhaps at :04, :14, :24)
H(0-29)/10 * * * *
# once every two hours every weekday (perhaps at 10:38 AM, 12:38 PM, 2:38 PM, 4:38 PM)
H 9-16/2 * * 1-5
# once a day on the 1st and 15th of every month except December
H H 1,15 1-11 *

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Jenkins Build Periodically - Schedule

From Dev

Jenkins Build Periodically - Once

From Dev

How to build periodically on Jenkins?

From Dev

"Build Periodically" with a Multi-branch Pipeline in Jenkins

From Dev

add build parameter in jenkins build schedule

From Dev

Jenkins run batch command only at periodically build and not at polling build

From Dev

Can you exclude a timeframe in a Jenkins build schedule?

From Dev

how to change Jenkins build schedule to different time?

From Dev

Jenkins / Hudson: How to Build periodically only after another project are built

From Dev

Jenkins Group jobs together to define Build periodically on all jobs in the group

From Dev

Android - efficiently schedule a task periodically?

From Dev

Android - efficiently schedule a task periodically?

From Dev

Run jenkins job periodically

From Dev

Jenkins as Windows Service : How to schedule daily build (something similar like cron job)

From Dev

What api to use in crossrider extension to schedule code to run periodically

From Dev

Jenkins schedule JOBS based on week

From Dev

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

From Dev

How to periodically check if any file changed and then build

From Java

How do I schedule jobs in Jenkins?

From Dev

Need to restart Jenkins service programmatically on a schedule

From Dev

How to schedule C# unit tests with Jenkins?

From Dev

How to schedule a Jenkins job each 15 minutes

From Dev

Jenkins GitHub Organization jobs triggered by schedule

From Dev

Schedule periodic builds in jenkins till a specific date

From Dev

How to run a job periodically and only if it's not already running on Jenkins

From Dev

On Heroku, how can I schedule the postgres database for my Rails app to be periodically reset?

From Dev

laravel cannot run scheduled command, while queue:listen run schedule() periodically

From Dev

How to automatically change the trigger type of a build definition periodically?

From Dev

Jenkins disable build now

Related Related

  1. 1

    Jenkins Build Periodically - Schedule

  2. 2

    Jenkins Build Periodically - Once

  3. 3

    How to build periodically on Jenkins?

  4. 4

    "Build Periodically" with a Multi-branch Pipeline in Jenkins

  5. 5

    add build parameter in jenkins build schedule

  6. 6

    Jenkins run batch command only at periodically build and not at polling build

  7. 7

    Can you exclude a timeframe in a Jenkins build schedule?

  8. 8

    how to change Jenkins build schedule to different time?

  9. 9

    Jenkins / Hudson: How to Build periodically only after another project are built

  10. 10

    Jenkins Group jobs together to define Build periodically on all jobs in the group

  11. 11

    Android - efficiently schedule a task periodically?

  12. 12

    Android - efficiently schedule a task periodically?

  13. 13

    Run jenkins job periodically

  14. 14

    Jenkins as Windows Service : How to schedule daily build (something similar like cron job)

  15. 15

    What api to use in crossrider extension to schedule code to run periodically

  16. 16

    Jenkins schedule JOBS based on week

  17. 17

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

  18. 18

    How to periodically check if any file changed and then build

  19. 19

    How do I schedule jobs in Jenkins?

  20. 20

    Need to restart Jenkins service programmatically on a schedule

  21. 21

    How to schedule C# unit tests with Jenkins?

  22. 22

    How to schedule a Jenkins job each 15 minutes

  23. 23

    Jenkins GitHub Organization jobs triggered by schedule

  24. 24

    Schedule periodic builds in jenkins till a specific date

  25. 25

    How to run a job periodically and only if it's not already running on Jenkins

  26. 26

    On Heroku, how can I schedule the postgres database for my Rails app to be periodically reset?

  27. 27

    laravel cannot run scheduled command, while queue:listen run schedule() periodically

  28. 28

    How to automatically change the trigger type of a build definition periodically?

  29. 29

    Jenkins disable build now

HotTag

Archive