Cron job every 5 minutes
The crontab line for a job every 5 minutes is */5 * * * *. It runs 288 times a day, 105,120 times a year. Edit it below to see the next runs in your time zone.
How */5 * * * * reads
The five fields are minute, hour, day of month, month and day of week. A star means every value.
| Field | Value | Meaning |
|---|---|---|
| Minute | */5 | every 5th minute, starting at 0: 0, 5, 10, 15… |
| Hour | * | every hour |
| Day of month | * | every day of month |
| Month | * | every month |
| Day of week | * | every day of week |
For example, from Wednesday 6 January 2027 at 10:07 the next runs are: Wed 6 Jan 2027, 10:10; Wed 6 Jan 2027, 10:15; Wed 6 Jan 2027, 10:20; Wed 6 Jan 2027, 10:25; Wed 6 Jan 2027, 10:30.
What a job every 5 minutes is for
Every 5 minutes is the usual choice for syncing with another system, refreshing a cache or a feed, or cleaning up expired sessions: often enough that users don’t wait long, rare enough that the job never overlaps itself.
Common mistakes
- «5 * * * *» runs once an hour, at 5 minutes past. Every 5 minutes is «*/5» in the minute field.
- Runs fall on :00, :05, :10 and so on, the same minutes on every server, so many jobs on a shared host start at the same moment. To spread the load, offset it: «2-59/5 * * * *» runs at :02, :07, :12…
The same schedule as a systemd timer
On systems with systemd, a timer can replace the crontab line: OnCalendar=*:0/5. Check it with systemd-analyze calendar "*:0/5", which prints the next run.
Know when it didn’t run
Cron doesn’t tell you when a job stops running. Add a heartbeat monitor with a period of 5 minutes and end the line with a call to its URL, for example */5 * * * * /path/job.sh && curl -fsS -m 10 <ping URL>. If a ping is late by more than the grace time you set, you get an alert, and a call to the URL with /fail reports a failure at once.
What is the cron expression for a job every 5 minutes?
*/5 * * * *. It runs 288 times a day, 105,120 times a year, on the server’s clock.
How do I run a job every 5 minutes with systemd instead?
Create a timer with OnCalendar=*:0/5 next to a service that runs the job, then enable it with systemctl enable --now name.timer. Persistent=true also runs a run that was missed while the machine was off.
Other schedules: every minute · every 10 minutes · every 15 minutes · every 30 minutes · every hour · every 2 hours · every 6 hours · every 12 hours · every day at midnight · every Monday · every weekday · on the first day of every month · Cron expression generator