Skip to content
Webmaster Tools
Dev utilitiesCron ParserEvery 5 minutes

Cron every 5 minutes

The cron expression for every 5 minutes is */5 * * * *. What each field means, variants for working hours and weekdays, and the GitHub Actions and AWS forms.

Cron expression
*/5 * * * *
See the next run times

The expression

*/5 * * * *

Runs at minute 0, 5, 10, 15 … 55 of every hour, every day: 288 times a day.

Field Value Meaning
Minute */5 every 5th minute, starting at 0
Hour * every hour
Day of month * every day
Month * every month
Day of week * every day of the week

*/5 is a step: "every 5th value of this field, starting from the lowest". It's the same as writing 0,5,10,15,20,25,30,35,40,45,50,55. Runs land on the clock (12:00, 12:05, 12:10), not 5 minutes after the job was installed.

Variants

Schedule Expression
Every 5 minutes, offset by 2 (12:02, 12:07…) 2-59/5 * * * *
Every 5 minutes during working hours (9:00 to 17:55) */5 9-17 * * *
Every 5 minutes on weekdays only */5 * * * 1-5
Every 5 minutes, 9 to 5 on weekdays */5 9-17 * * 1-5
Every 10 minutes */10 * * * *
Every 15 minutes */15 * * * *

Offsetting by a minute or two is a good habit for jobs on shared infrastructure, so yours doesn't start at the same second as everyone else's */5.

Where to write it

  • crontab (Linux, macOS): */5 * * * * /usr/local/bin/backup.sh in crontab -e. Times are in the server's time zone; set CRON_TZ= at the top of the file on systems that support it.
  • GitHub Actions: on: schedule: - cron: '*/5 * * * *'. Always UTC, and 5 minutes is the shortest interval GitHub allows; under load, runs can start late or be skipped.
  • Kubernetes CronJob: schedule: "*/5 * * * *", with timeZone: to set the zone. Set concurrencyPolicy: Forbid if a run can take longer than 5 minutes.
  • AWS EventBridge: six fields with a year, and ? in one of the day fields: cron(0/5 * * * ? *). Or use rate(5 minutes).

Common mistakes

  • 5 * * * * is not every 5 minutes. It runs once an hour, at minute 5.
  • Overlapping runs. If the job can take longer than 5 minutes, two copies run at once. Use a lock (flock -n /tmp/job.lock command) or the platform's concurrency setting.
  • Silent failures. Cron mails output to the local user, which nobody reads. Redirect it to a log: command >> /var/log/job.log 2>&1.

Paste any expression into the Cron Expression Parser to see it in words and its next run times.