Sign up free

Cron · Every 5 minutes

Cron every 5 minutes

crontab schedule
*/5 * * * *

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

What it means

  1. minute*/5every 5th minute: 0, 5, 10 … 55
  2. hour*every hour
  3. day of month*every day
  4. month*every month
  5. day of week*every day of the week

Next runs

    Cron uses the server's time zone. Most servers run in UTC; check with date on the server.

    When to use it

    Every 5 minutes is the most common schedule for queue workers, syncs and cache warmers. */5 means "every minute that divides by 5", so runs land on :00, :05, :10 and so on, not 5 minutes after you saved the crontab.

    Variations

    • 2-59/5 * * * *: every 5 minutes, offset to :02, :07 …. Spreads load when many jobs start on :00.
    • */5 9-17 * * *: every 5 minutes during working hours.

    Common mistakes

    • 5 * * * * is once an hour at minute 5, not every 5 minutes.
    • Day of month and day of week together. If both are set (not *), standard cron runs when either matches, not both. 0 0 13 * 5 runs on every 13th and every Friday.
    • The job runs, but fails. Cron only starts the command. Exit codes and errors go to local mail or nowhere. Add && before the ping so a failed job doesn't ping.
    • Environment. Cron runs with a minimal PATH and no shell profile. Use full paths in the command.

    On other platforms

    • GitHub Actions (on: schedule): Same 5-field syntax, in UTC by default. The shortest interval is 5 minutes, and runs can start late under load. GitHub docs
    • Kubernetes CronJob: Same 5-field syntax. Set the time zone with .spec.timeZone (stable since v1.27), not with CRON_TZ in the schedule. Kubernetes docs
    • Vercel Cron Jobs: Hobby runs at most once a day, timed within the hour. Pro can run every minute. Vercel docs

    Know when it stops running

    crontab
    */5 * * * * /path/to/your-job.sh && curl -fsS -m 10 https://<your heartbeat URL> > /dev/null
    Expected every
    5 minutes
    Grace
    5 minutes
    Monitor this job

    Heartbeat monitors are on Pro ($15 a month, or $12 billed yearly) and Agency. Free covers website, keyword, ping and port checks.

    Questions

    Is */5 the same as 0,5,10,…,55?

    Yes.

    Can GitHub Actions run every 5 minutes?

    5 minutes is its shortest interval, and runs can start late when GitHub is busy.

    Why did my job run at :05 and not 5 minutes after I added it?

    Steps are counted from :00 of each hour.