Cron every 5 minutes
*/5 * * * * — */5 in the minute field is a step over the whole range 0–59: minute 0, 5, 10 … 55, every hour, every day — 288 runs a day.
Runs
Try one
The same schedule in every dialect
| Where | Expression | |
|---|---|---|
| Linux / Unix crontab, Kubernetes, GitHub Actions | */5 * * * * | explain |
| Quartz Scheduler | 0 0/5 * ? * * | explain |
| AWS EventBridge | cron(0/5 * * * ? *) rate(5 minutes) | explain |
Spring @Scheduled | 0 */5 * * * * | explain |
| Jenkins | H/5 * * * * | H calculator |
systemd timer OnCalendar= | *-*-* *:00/5:00 | test |
AWS rate(5 minutes) repeats at a fixed interval from when the rule or schedule was created, so it is not aligned to the clock the way the cron() form is.
Things to know
*/5always lands on :00, :05, :10… Thousands of jobs everywhere fire on those same minutes.2-59/5 * * * *runs just as often at :02, :07, :12 and avoids the pile-up.*/5is the most frequent schedule GitHub Actions accepts, and GitHub warns that runs can be delayed at busy times such as the top of the hour.- In Jenkins,
H/5keeps the five-minute rhythm but starts at a per-job minute, so a hundred jobs do not start together.
Variations
| Expression | Runs |
|---|---|
| */5 9-17 * * 1-5 | every 5 minutes during office hours on weekdays |
| 2-59/5 * * * * | every 5 minutes, offset to :02, :07, :12 … |
| */5 * * * 0,6 | every 5 minutes at weekends only |
How to use this schedule
- Open your crontab with
crontab -e(or the scheduler's config file). - Add a line with the expression followed by the command:
*/5 * * * * /usr/local/bin/job.sh. Use absolute paths — cron runs with a minimalPATH. - Save. cron picks the change up automatically; check the next run times above, in the time zone your server uses.
- Redirect output if you want to keep it: append
>> /var/log/job.log 2>&1. The crontab line builder assembles the whole line.
FAQ
Is "*/5 * * * *" the same on every server?
The five-field form means the same thing in Linux cron, Kubernetes, GitHub Actions and most libraries. The clock it follows differs:
a Linux server uses its own time zone (or CRON_TZ on cronie), GitHub Actions and AWS EventBridge rules use UTC unless a time zone is configured, and Kubernetes uses the controller's zone unless .spec.timeZone is set.
Why do Quartz and AWS need a "?"
Both require exactly one of day-of-month and day-of-week to be ?, meaning "no specific value"; they refuse an expression that restricts both, or leaves both as *.
How do I check it will run when I expect?
The widget above lists the next runs in the time zone you choose, and flags any run that lands in a daylight-saving gap or a repeated hour. For a whole crontab, paste it into the crontab viewer.