Cron expression generator & parser

Cron expression for every 5 minutes

To run a job every 5 minutes, use */5 * * * *. The */5 in the minute field means every fifth minute starting at 0, so the job runs at :00, :05, :10 and so on through :55, which is 12 times an hour and 288 times a day.

The tool below already has the expression filled in. It explains each field and lists the next run times, in UTC or your own time zone.

Cron expression generator & parser
Preset
Show times in
Next runs
Cron expressionCRON

Press Command or Control plus Enter to run. Tab inserts indentation; press Escape, then Tab, to leave the editor.

Result
Your result will appear here.
Ready1 line · 11 chars

Variations

ScheduleExpression
Every 5 minutes*/5 * * * *
Every 5 minutes, starting at minute 2 (:02, :07, :12…)2-59/5 * * * *
Every 5 minutes from 09:00 to 17:55*/5 9-17 * * *
Every 5 minutes on weekdays only*/5 * * * 1-5
Every 5 minutes during working hours on weekdays*/5 9-17 * * 1-5
Every 10 minutes*/10 * * * *
Every 15 minutes*/15 * * * *

Why offset the minute

Many jobs are scheduled at :00, :05 and :10, so shared servers and hosted schedulers are busiest at exactly those moments. Starting a few minutes later with 2-59/5 spreads the load and, on GitHub Actions, makes delayed or skipped runs less likely.

The same schedule on other platforms

  • Linux crontab: */5 * * * * /usr/local/bin/sync.sh >> /var/log/sync.log 2>&1
  • GitHub Actions: - cron: "*/5 * * * *". Five minutes is the shortest interval GitHub allows, and runs can start late when GitHub is busy.
  • Kubernetes CronJob: schedule: "*/5 * * * *". Set concurrencyPolicy: Forbid if a run can take longer than five minutes.
  • Quartz, Spring and node-cron with seconds: 0 */5 * * * * (Spring) or 0 0/5 * * * ? (Quartz), because these add a seconds field at the start.
  • systemd timer: OnCalendar=*:0/5.

Avoid overlapping runs

Cron starts a new run every five minutes whether or not the last one has finished. If a run can take longer, wrap the command in flock so a second copy exits straight away: */5 * * * * flock -n /tmp/sync.lock /usr/local/bin/sync.sh.

Frequently asked questions

Is */5 the same as 0,5,10,15,20,25,30,35,40,45,50,55?

Yes. */5 is shorthand for that list. Both run at the same 12 minutes of every hour.

Does */5 run 5 minutes after the job starts?

No. Cron schedules are based on the clock, not on when the job was added, so */5 always runs at minutes divisible by 5. The first run is at the next such minute.

How do I run a job every 5 seconds?

Standard cron can't go below one minute. Use a loop inside the job, a systemd timer with OnUnitActiveSec=5s, or a scheduler that supports a seconds field.

More cron expression generator & parser guides

Open the full cron expression generator & parser →

From the blog