Cron every 5 minutes (*/5 * * * *): syntax, the step operator and its limits

Open this example in the tool

Try it in the tool

Cron Expression Parser

Read cron schedules in plain English and see when they run next.

Cron Expression Generator

Pick a schedule, get the cron expression and its next run times.

*/5 * * * * runs a job every five minutes. The */5 in the minute field is a step: take every fifth value of the range 0-59. The cron parser describes it as “Every 5 minutes” and expands the field to 0,5,10,15,20,25,30,35,40,45,50,55. The next runs are always on a multiple of five on the clock:

11:25   11:30   11:35   11:40   11:45   ...

The step operator

A step is written range/step:

Field Meaning
*/5 from the start of the field to its end, every 5th value
0-30/5 every 5th value between 0 and 30: 0, 5, 10, 15, 20, 25, 30
2-59/5 start at 2, every 5th value: 2, 7, 12, …, 57

It works in any field. 0 */2 * * * is every second hour, on the hour, and 0 0 */3 * * is every third day of the month (the 1st, 4th, 7th and so on), not “every 72 hours”.

Where the step breaks

A step counts from the start of the field, not from the previous run. So it only gives an even rhythm when the step divides the field’s size. Minutes have 60 values, so 2, 3, 4, 5, 6, 10, 12, 15, 20 and 30 are fine. Anything else gives an uneven gap:

*/7  →  minutes 0, 7, 14, 21, 28, 35, 42, 49, 56 — then 0 again, 4 minutes later

Run */7 * * * * through the parser and you can see a gap of 4 minutes at each hour. The same thing happens with hours: 0 */5 * * * gives 0, 5, 10, 15 and 20 o’clock, and then the 0 o’clock of the next day, a gap of 4 hours. If you really need “every 7 minutes”, cron is the wrong tool: use a systemd timer, or have the job check the time since its last run.

Why the offset is useful

Many jobs start at minute 0, 5, 10, so the servers behind an API or a database get a burst at the same moment. If you have a choice, start at an odd minute:

2-59/5 * * * * /usr/local/bin/sync.sh >> /var/log/sync.log 2>&1

That is “every 5 minutes, starting at minute 2”. It avoids the common peaks at :00 and :30 without changing the frequency.

Checklist

  • The job must finish well inside 5 minutes, or protect it with flock as shown in every minute.
  • Use absolute paths and redirect the output; cron’s environment is minimal.
  • The schedule uses the server’s time zone, which is often UTC. It does not matter for “every 5 minutes”, but it does for anything tied to the time of day.

For a slower pace, see every 15 minutes and every 6 hours. To assemble an expression by clicking, use the cron builder.

Frequently asked questions

What does */5 mean in cron?

Every fifth value of the field, counted from its start. In the minute field that is 0, 5, 10 and so on up to 55. The slash is the step operator, and it works in every field.

Is */5 the same as 0-59/5 and 0,5,10,15,20,25,30,35,40,45,50,55?

Yes, all three expand to the same twelve minutes. The star form is the shortest and the easiest to read.

Why does */7 not run every 7 minutes?

The step restarts at the beginning of each hour. */7 gives minutes 0, 7, 14 and so on to 56, then the hour changes and the next run is minute 0, only 4 minutes later. Cron can only keep an even gap when the step divides 60.

How do I run every 5 minutes but not on the hour, at minute 2, 7, 12, ...?

Give the range a start: 2-59/5 * * * *. It runs at minutes 2, 7, 12 and so on up to 57.

More in this reference