cronkit.org
Cron expressions, explained and converted — in your browser

Cron tools › Platforms

Jenkins H calculator

H, H/n, H(a-b) · seeded by the job's full name · multi-line specs

Enter a job's full name and its "Build periodically" or "Poll SCM" spec. The calculator reproduces Jenkins' own hash, so you see the concrete minutes and hours H turns into for that job, what each line means, and when it will run next.

Line by line

Next runs

Compare job names

Try one

How to work out what H means for a Jenkins job

  1. Type the job's full name: the path with its folders, such as team/app/deploy, not the display name.
  2. Paste the spec exactly as it is in the job configuration or the cron() / pollSCM() trigger, all lines.
  3. Read Line by line: each line's H fields are replaced by the numbers Jenkins will use, so H/15 becomes something like 11,26,41,56.
  4. Check the zone. A TZ= on line 1 applies to the whole spec; otherwise the controller's zone applies (the page assumes your browser's).
  5. Add other job names under Compare job names to see how H spreads them across the hour.

How Jenkins turns H into a number

Jenkins hashes the job's full name (MD5 of the UTF-8 bytes, folded to eight bytes) and seeds a java.util.Random with it. Every H in the spec then takes the next random number, field by field and left to right. The same name always gives the same numbers, so a job keeps its minutes across restarts, and a renamed or moved job gets new ones.

FormPicks
Hone value in the field's range; day-of-month is capped to 1-28 and day-of-week to 0-6 so it exists every month and week
H/15a start offset below 15, then every 15th value (H/1 is the same as H)
H(0-29)one value in 0-29 (no cap on a range you give)
H(0-29)/10a start offset, then every 10th value up to 29
@hourly · @daily · @midnightH * * * * · H H * * * · H H(0-2) * * *
@weekly · @monthly · @yearlyH H * * H · H H H * * · H H H H *

Several lines share one random stream. Jenkins ORs the lines of a spec and feeds all their Hs from the same Random, in the order they appear. Two identical lines therefore get different minutes: for the name seed, H * * * * twice gives minutes 35 and 56. Reordering lines changes the result too.

The calculator reproduces Jenkins' own test cases: stuff with H gives :56, H H(12-13) * * * gives 13:56 and H/15 gives 11, 26, 41, 56; junk with @hourly gives :20 and H(0-15)/3 starts at 2.

Jenkins cron syntax in short

Five fields, digits only: no month or weekday names and no ?, L, W or #. Day-of-week is 0-7 with both 0 and 7 meaning Sunday. When both day fields are set, a time must match both (Jenkins ANDs them, unlike Linux cron). For plain cron the cron parser works too, and the stagger generator spreads jobs by hand when you need fixed times.

FAQ

Why did my job's run time change after I moved it into a folder?

The seed for H is the job's full name, and moving a job into a folder changes it (deploy becomes team/deploy). New name, new hash, new minutes. Renaming has the same effect.

Does H change when Jenkins restarts?

No. The value comes only from the job's full name and the spec, so it is the same after every restart and on every controller.

Where does TZ= go?

On the first line of the spec, alone: TZ=Europe/London. It then applies to every line. Anywhere else Jenkins rejects the line.

Why do two identical lines run at different minutes?

All lines of one spec draw from a single random stream, so the second H gets the next number rather than the same one.

Does "0 0 1 * 1" run on the 1st and on every Monday?

Not in Jenkins. Both day fields must match, so it runs only when the 1st of a month is a Monday.