Cron every 5 minutes: */5 * * * *
*/5 * * * * runs 12 times an hour, 288 times a day, on minutes ending in 0 and 5. It is the most common non trivial cron expression in use.
At a glance
- Expression
- */5 * * * *
- Fires
- 288 times a day, 12 times an hour, 2,016 times a week.
- Restricted fields
- Minute only. Hour, day of month, month and day of week are all open.
- Equivalent macro
- None.
- Minutes matched
- 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55.
- Offset variant
- 2-59/5 matches 2, 7, 12 ... 57, same count, no collision on :00.
In detail
Five divides 60 four times over, so this expression produces a perfectly even twelve runs an hour with no awkward gap when the hour rolls over. That regularity, plus the fact that five minutes is short enough to feel responsive and long enough for most scripts to finish, is why it turns up more than any other step schedule.
Its popularity is also its weakness. Minute 0 of every hour is already the busiest minute on any server: it carries the hourly jobs, the quarter hour jobs, the half hour jobs and every other */5. If your five minute job reads a shared database or calls a rate limited API, the run at :00 competes with all of them. Moving to 2-59/5 keeps the twelve runs and puts them on minutes nobody else uses.
At twelve runs an hour a job that takes four minutes is fine and a job that takes six is a slow motion disaster, because each run starts before the previous one has finished and the backlog grows by one process every five minutes until something falls over. Measure the worst case runtime, not the average, and if it is anywhere near five minutes either lock the job or lengthen the interval.
Data pipelines built on this schedule usually want the five minute window as a query bound, not just as a trigger. Deriving the window from the wall clock inside the script, rather than from when the script happened to start, makes a delayed run still cover the right period and makes a skipped run visible as a gap instead of as silently missing rows.
Examples
*/5 * * * *2-59/5 * * * *Fires at 2, 7, 12, 17 ... 57. Twelve runs an hour, none at the top of the hour.
*/5 * * * * /usr/bin/flock -n /var/lock/ingest.lock /opt/app/bin/ingest.sh >> /var/log/ingest.log 2>&1Things that catch people out
- */5 does not mean five minutes after the job was installed. It means minutes divisible by 5, so a crontab installed at 12:03 first runs at 12:05.
- Writing 5 * * * * by mistake gives one run an hour at five past, not twelve runs an hour. The step slash is what makes it a repeat.
- Twelve runs an hour against a third party API is 8,640 calls a month per host. Multiply by the number of hosts before assuming the free tier covers it.
Try it: Cron Expression Parser
Paste any five or six field expression to get a plain English description, a per field breakdown and the next run times in your local time.
Cron Expression Parser
LOCAL · Browser-OnlyParse cron expressions and see the next scheduled run times
Supports 5-field (minute hour day month weekday), 6-field (with seconds), named values (JAN, MON), and @macros (@daily, @hourly, ...)
Use the dropdowns below to build your cron expression visually, or type a custom value in each field.
Human-Readable Description
Every 5 minutes
Field Breakdown
| Field | Allowed | Value | Meaning |
|---|---|---|---|
| Minute | 0-59 | */5 | every 5 minute(s) |
| Hour | 0-23 | * | every hour |
| Day of Month | 1-31 | * | every day of month |
| Month | 1-12 | * | every month |
| Day of Week | 0-7 | * | every day of week |
Related cron expressions
All cron expressions →Cron every 10 minutes: */10 * * * *
*/10 * * * * fires 144 times a day at minutes 0, 10, 20, 30, 40 and 50. Run counts, offset variants and the rate limit maths that make it popular.
Cron every 15 minutes: */15 * * * *
*/15 * * * * fires 96 times a day on the quarter hours. What happens to the count on the two daylight saving days, and how 7-59/15 spreads the load.
Cron every 3 minutes: */3 * * * *
*/3 * * * * fires 480 times a day at minutes 0, 3, 6 and so on to 57. Why 3 divides the hour cleanly and what that means for scheduling.
Cron n/step: starting a step from a value you choose
The form 5/15 means start at 5 and step by 15, giving 5, 20, 35 and 50. It is how you move a repeating job off the crowded top of the hour.
Cron every 20 minutes: */20 * * * *
*/20 * * * * fires 72 times a day at minutes 0, 20 and 40. Why three runs an hour is the practical floor for jobs with a long startup cost.
Cron every 30 minutes: */30 * * * *
*/30 * * * * fires 48 times a day at minutes 0 and 30. The half hour is the busiest slot on most servers, and 15,45 costs nothing to move to.
Tools for this
- Cron Expression Parser Free online cron expression parser - parse cron expressions and see the next scheduled run times
- Crontab Generator Free online crontab generator - build cron expressions visually with an intuitive interface