How to run a cron job every 5 minutes with */5

By TechCompare · Updated · How we check

*/5 * * * * is correct for most every-5-minute use cases. Add locking if the job runtime might exceed the interval. For sub-minute scheduling, cron is the wrong tool. Use a daemon or systemd timer instead.

Calculator

Next runs of */5 * * * *

Example from Mon, Nov 9, 2026 at 8:00 AM.

  1. Mon, Nov 9, 2026 at 8:05 AM
  2. Mon, Nov 9, 2026 at 8:10 AM
  3. Mon, Nov 9, 2026 at 8:15 AM
  4. Mon, Nov 9, 2026 at 8:20 AM
  5. Mon, Nov 9, 2026 at 8:25 AM

Running a cron job every 5 minutes uses the step operator in the minute field: */5 * * * *. The */5 means every 5th minute. At the top of each hour the job fires at :00, :05, :10, and so on.

Schedule pattern
Every 5 minutes
every-5-minutes
Category
Common Patterns
Standard cron expression patterns

How this is calculated

The slash operator divides the range (0-59 for minutes) into steps. */5 is shorthand for 0,5,10,15,20,25,30,35,40,45,50,55. If you need offset timing (e.g. :02, :07, :12), list the values explicitly: 2,7,12,17,22,27,32,37,42,47,52,57. Running a job every 5 minutes means 288 executions per day. If the job takes more than 5 minutes to complete, overlapping runs can cascade. Add a lock file or use flock to prevent concurrent execution.

Verdict

Use */5 * * * * and add a lock. The step operator turns one expression into 288 daily runs, and a single run that goes past five minutes would pile up overlapping copies. */5 expands to minutes 0,5,10,15 through 55 of each hour, and you can shift offset timing by listing values like 2,7,12 explicitly.

More Cron scenarios

Every hour
To run a job at the top of every hour, use 0 * * * *.
View details
Daily at midnight
0 0 * * * runs a job at exactly midnight (00:00) every day.
View details
Weekly schedule
0 0 * * 0 runs a job every Sunday at midnight.
View details

Frequently asked questions

How do I run a cron job every 5 minutes?
Use */5 in the minute field: */5 * * * *. The step operator divides the 0-59 minute range into fifths, so the job fires at :00, :05, :10, and so on through :55. This is the standard pattern for health checks, metric collection, and near-real-time polling.
How many times a day does a */5 cron job run?
288 times per day. That's fine for a lightweight health check, but it means a slow job can pile up. If a single run ever takes longer than 5 minutes, the next invocation starts while the previous one is still going, which can cascade into overlapping runs. Guard it with flock or a lock file.
What if cron every 5 minutes overlaps with the previous run?
Wrap the command with flock: */5 * * * * flock -n /tmp/myjob.lock /path/to/script. The -n flag makes the new invocation exit immediately if the old one still holds the lock. Without some form of locking, a job whose runtime grows past 5 minutes will eventually stack up copies of itself and starve the machine.