Cron expression generator · every 5 minutes

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.

—

Next runs

    Field by field

    How */5 * * * * reads

    The five fields are minute, hour, day of month, month and day of week. A star means every value.

    FieldValueMeaning
    Minute*/5every 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.

    When to use it

    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.

    Mistakes

    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…
    systemd

    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.

    Monitoring

    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.