refareviews.blogg.se

Cron schedule creator
Cron schedule creator









cron schedule creator

Start build at midnight: or start build at midnight, every Saturday: 59 23 * * 6Įvery first of every month between 2:00 a.m. or 16:00 -16:59 depending on the projects hash: H 16 * * 1-5 Start build daily in the late afternoon between 4:00 p.m. Weekday daily build twice a day, at lunchtime 12:00 and midnight 00:00, Sunday to Thursday: 00 0,12 * * 0-4 Start build daily at 08:30 in the morning, Monday - Friday: 30 08 * * 1-5

Cron schedule creator code#

H(0,30) will return the hash code of the project where the possible hashes are 0-30. You can also specify the value to be between numbers, i.e. Each project starts its execution at a different minute depending on its hash code. This is so that if you are building several projects on your build machine at the same time, let’s say midnight each day, they do not all start their build execution at the same time. It will calculate the parameter based on the hash code of you project name. The letter H, representing the word Hash can be inserted instead of any of the values. 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. In contrast, using H H * * * would still execute each job once a day, but not all at the same time, better using limited resources. To allow periodically scheduled tasks to produce even load on the system, the symbol H (for “hash”) should be used wherever possible.įor example, using 0 0 * * * for a dozen daily jobs will cause a large spike at midnight. If you want to schedule your build every day at 8h00, this will do the job : 0 8 * * *įor the past few versions (2014), Jenkins have a new parameter, H (extract from the Jenkins code documentation): If you want to schedule your build every 5 minutes, this will do the job : */5 * * * *

cron schedule creator

DAYWEEK Day of the week (0-7) where 0 and 7 are sunday.Jenkins used a cron expression, and the different fields are: By setting the schedule period to 15 13 * * * you tell Jenkins to schedule the build every day of every month of every year at the 15th minute of the 13th hour of the day.











Cron schedule creator