Cron tools › Build / Generate
Cron stagger generator
Paste a list of job names or hostnames and get one crontab line each, with start times spread across the window instead of every job firing at :00. The histogram shows the spread; the stats say how close any two jobs start.
Crontab lines
Spread
Per job
| Name | Schedule | Starts |
|---|
How to stagger cron jobs
- Paste the names — job names, hostnames, tenant ids — one per line. Blank lines and lines starting with
#are skipped. - Choose the cadence: once an hour, once a day inside a window such as 01:00-05:00, or every N minutes or hours.
- Choose the method. Hash gives each name the same minute every time you run the tool; even spacing spaces the list out perfectly but depends on its order.
- Set the command with
{name}where the name goes. Any%in it is escaped as\%for cron. - Check the histogram and the "most starts in one minute" figure, then copy or download the lines.
The thundering herd
Write 0 * * * * on fifty machines and at the top of every hour fifty jobs start in the same second: they hit the same database, fill the same
network link and queue for the same lock. Nothing is wrong with any one job; the load arrives as a spike. Hosted schedulers see the same thing at scale — GitHub warns
that scheduled workflows are delayed at busy times, "especially at the start of every hour". The fix is to give each job its own minute, so the same work arrives as a flat line.
Hash or even spacing?
| Hash of the name | Even spacing | |
|---|---|---|
| Same input, same minute | Always — FNV-1a (32-bit) of the UTF-8 name, modulo the minutes in the cycle | Only if the list and its order stay the same |
| Adding a job | Nobody else moves | Everyone after it moves |
| Collisions | Possible (birthday odds); "Avoid collisions" bumps a clash to the next free minute | None while there are fewer jobs than minutes |
| Best for | Config generated per host, where each machine computes its own line | A fixed, hand-maintained list |
Jenkins has this built in: H in a Jenkins schedule is replaced by a value hashed from the job's name, so H * * * * gives every job its own
minute without any tooling. See what H resolves to for your job in the Jenkins H calculator. For a random
delay that changes on every run instead of a fixed offset, the crontab line builder adds sleep $((RANDOM % 300)).
FAQ
Is the hash the same as Jenkins' H?
No. Jenkins seeds java.util.Random from an MD5 of the job's full name; this tool uses FNV-1a so that any language can reproduce it in a few lines.
Both are stable: the same name always gets the same minute.
How is the daily window split?
Each minute from the start of the window up to (not including) its end is a slot: 01:00-05:00 gives 240 slots. A window may cross midnight, e.g. 22:00-02:00. Equal start and end mean the whole day.
Why only some values for "every N minutes"?
Cron steps restart at the top of every hour, so an interval that does not divide 60 leaves an uneven gap once an hour. The list offers the intervals that divide
the hour (or, for hours, the day), and each job's offset is written as 7-59/15-style ranges that every Linux cron accepts.