plain/devtools home

Cron every 5 minutes

Use */5 * * * *. It runs at minute 0, 5, 10 and so on up to 55 of every hour, every day: 12 runs an hour and 288 a day.

Last reviewed 2026-11-04.

cron-explainersampless sample
Next runs in

FieldAllowed
minute0-59
hour0-23
day of month1-31
month1-12 or JAN-DEC
day of week0-7 or SUN-SAT (0 and 7 are Sunday)

never leaves your browser

Worked example

Say the job is a health check, saved with crontab -e:

$ */5 * * * * /usr/local/bin/healthcheck.sh >> /var/log/healthcheck.log 2>&1

The run times

The step */5 in the minute field means every fifth value starting at 0. In the hour starting at 10:00 the job runs at 10:00, 10:05, 10:10, 10:15, 10:20, 10:25, 10:30, 10:35, 10:40, 10:45, 10:50, 10:55, then 11:00. Because 5 divides 60 evenly, the gap is always exactly five minutes, including across the hour. The expression 0-59/5 means the same thing. The tool above lists the next run times for any expression.

The same schedule on other platforms

  • Kubernetes CronJob: */5 * * * *, the same five fields.
  • GitHub Actions: */5 * * * * under on.schedule. Five minutes is the shortest interval GitHub supports, and runs can start late under load.
  • AWS EventBridge: cron(0/5 * * * ? *) or rate(5 minutes). EventBridge cron has six fields and needs a question mark in one of the day fields.
  • Quartz and Spring: 0 */5 * * * *. These add a seconds field at the front.

Common mistakes

  • Writing 5 * * * *. That runs once an hour at minute 5, not every five minutes.
  • Letting a slow job overlap the next run. Add a lock, for example flock -n /tmp/job.lock command.
  • Forgetting that cron uses a minimal environment. Use absolute paths to commands and files.

Running this on a server

Cron needs a machine that is always on; static hosts do not run it. A small VPS runs a crontab fine. The hosting guide compares static hosts and VPS options.

Frequently asked questions

What is the difference between */5 and 0/5?

In standard Unix cron */5 is the portable form. 0/5 works in Quartz and EventBridge but is not valid in every Unix cron.

Can cron run every 5 seconds?

Not in five field cron, whose smallest unit is a minute. Use a long-running process, or a scheduler with a seconds field such as Quartz.

Why did my job run at a different time?

Cron uses the time zone of the host or platform. Check it first, then read the next run times in the tool.

Sources

Related

esc
↑↓ move↵ open? all shortcuts

Keyboard shortcuts

Cmd or Ctrl shortcuts always work.
Everywhere
Everywhere
Open the command palette
CtrlK
Open the palette (outside a text field)
/
Show these shortcuts
?
Toggle light and dark theme
t
Go home
gh
Go to all tools
gt
On a tool page
On a tool page
Run the main action
Ctrl↵
Copy the output
c
Load the next sample
s
Focus the input
i
Leave a text field
Esc
Previous or next tool
[]
In the palette
In the palette
Move the selection
↑↓
Open the selected item
↵
Close
Esc