Skip to the tool
DevToolBench

Cron Every 5 Minutes

A five-minute schedule, and how to offset it.

minute hour day-of-month month day-of-week

At every 5th minute past every hour.

Fields

minute
*/5
hour
*
day of month
*
month
*
day of week
*

Next 5 runs

Times shown in your own timezone.

Common schedules

Five-minute schedules

ExpressionWhat it doesCopy
*/5 * * * *Every 5 minutes, starting at :00At every 5th minute past every hour.
2-59/5 * * * *Every 5 minutes, shifted to :02At every 5th minute past every hour.
*/5 9-17 * * 1-5Every 5 minutes, office hours onlyAt every 5th minute past every hour from 9 through 17 on every day-of-week from Monday through Friday.
*/5 * * * 1-5Every 5 minutes, weekdays onlyAt every 5th minute past every hour on every day-of-week from Monday through Friday.

Everything runs in your browser. Nothing you type is sent to a server.

Found a bug in this tool? Report it.

What a five-minute step really means

A cron every 5 minutes schedule fires twelve times an hour, at minute 0, 5, 10 and so on up to 55. It looks like an interval, and here it behaves like one, but the mechanism is different: cron is not counting five minutes from the last run, it is testing whether the current minute is divisible by five. The distinction stays invisible while the number divides 60 evenly, and becomes very visible the moment it does not.

Why a seven-minute step does not work

Take the same syntax and ask for seven. The count starts at 0 and lands on 0, 7, 14, 21, 28, 35, 42, 49 and 56. Then the hour rolls over, the count restarts, and the next run is at 0, four minutes after the previous one instead of seven. Once an hour, forever, the gap collapses.

Five, ten, fifteen, twenty and thirty are the values that survive the boundary, because they are the divisors of 60. Anything else gives you a short tick every hour. If you genuinely need a seven-minute gap, cron cannot express it, and a timer that schedules the next run when the current one finishes can.

Shifting the run off the top of the hour

Every service on the machine wants minute zero. Backups, log rotation, metric flushes and half a dozen agents all fire together, and the busiest minute of your hour is the one you chose by default. Moving off it costs nothing:

2-59/5 * * * *

The range sets the starting point and the step keeps the gap, so the job runs at :02, :07, :12 and on to :57 — still twelve times an hour, now on its own. Spreading a fleet is the same trick with a different offset per host.

Restricting the window

Twelve runs an hour is 288 a day, and most of those are at three in the morning when nothing is happening. The variants above narrow the same cadence to office hours and to weekdays, which is the cheapest reduction available: the schedule keeps its resolution when it matters and stops entirely when it does not. If even that is finer than you need, the 30-minute schedule halves it again.

The environment the job inherits

A five-minute schedule multiplies every environment problem by 288. Cron gives the command a minimal path and none of your shell profile, so an interpreter that resolves in your terminal may not resolve here, and a job that fails on every tick sends a mail per failure to a local mailbox nobody reads. Use absolute paths, redirect both streams to a file you have rotated, and confirm the first run before you walk away.

Check the reading before you install

The explainer at the top of this page is filled with the five-minute expression already, and every row in the table under it was read back by the same parser. Change any field and the sentence changes with it, along with the next five runs in your own timezone. When you are ready to write something the table does not cover, the cron expression generator takes any five-field line and tells you what it will actually do.

Frequently asked questions

Does the step in a cron expression restart every hour?

Yes, and that is the whole story. A step counts from the beginning of the field, not from the moment you installed the line. In the minute field it counts from 0 and stops at 59, then the next hour begins the count again from 0. Anything that divides 60 stays even across that boundary; anything else does not.

How do I run a job at 3, 8, 13 minutes past instead?

Write the range with the step, as `3-59/5`. The range fixes where the count starts and the step fixes the gap, so you get 3, 8, 13 and on to 58. A bare list such as `3,8,13,18,23,28,33,38,43,48,53,58` produces the same schedule and is harder to get wrong when someone edits it later.

Why do two different expressions read the same in the explainer?

Because the sentence reports the step, not the starting point. Both a plain step and a shifted one repeat every five minutes, so both are read as every 5th minute. The field breakdown in the panel above is where the difference shows, and the next five runs will differ by the offset you chose.

Is five minutes frequent enough for monitoring?

It depends what you promise. A five-minute schedule means an incident can exist for four minutes and fifty-nine seconds before anything notices, so your detection time is bounded by the interval, not by the check. If that number appears in an SLA, the interval is a decision, not a default.

Related tools

Updated