Skip to content

Cron schedule

Cron every 5 minutes

The cron expression for every 5 minutes is */5 * * * *. It runs at minutes 0, 5, 10 and so on up to 55 of every hour, 288 times a day.

Every 5 minutes
Expression*/5 * * * *
Runs288 times a day
systemd OnCalendar*:0/5

How it works

*/5 in the minute field is a step: start at the lowest value (0), take every fifth value up to the highest (59). That gives 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50 and 55. The other four fields are *, so those minutes match in every hour of every day.

The schedule is aligned to the clock, not to when you installed it. Save the crontab at 10:03 and the first run is at 10:05, then 10:10. Because 5 divides 60 evenly, the gap is exactly 5 minutes all day, including across the hour.

It’s also GitHub Actions’ floor: the documentation sets 5 minutes as the shortest interval for scheduled workflows. On GitHub, treat it as “roughly every 5 minutes”, since scheduled runs can start late when the service is busy.

Field-by-field breakdown
FieldValueMeaning
Minute*/5every 5 minutes: 0, 5, 10, …, 55
Hour*every hour
Day of month*every day of the month
Month*every month
Day of week*every day of the week

Next runs

Scheduler clock

As on GitHub Actions without timezone, Vercel, Cloudflare and Kubernetes with timeZone "Etc/UTC".

Next run times, computed in your browser from the current time
RunYour timeUTC
1Calculating… 
2  
3  
4  
5  

Ready-to-paste versions

The same schedule for each scheduler, with what differs on each one.

crontab (Linux, macOS, BSD)

crontab -e
# m h dom mon dow  command
*/5 * * * * /usr/local/bin/job.sh >> /var/log/job.log 2>&1

# Same, but skip a run while the previous one is still going:
*/5 * * * * flock -n /tmp/job.lock /usr/local/bin/job.sh
  • cron uses the server’s time zone. On cronie (Fedora, RHEL), a CRON_TZ=Europe/London line above the entry changes the zone for the entries below it.

GitHub Actions

.github/workflows/scheduled.yml
on:
  schedule:
    - cron: '*/5 * * * *'
  workflow_dispatch: {}
  • Runs in UTC unless you set timezone, and only on the default branch. GitHub’s docs warn that scheduled runs can be delayed at busy times and that schedules in public repositories are disabled after 60 days without activity.

Kubernetes CronJob

cronjob.yaml
apiVersion: batch/v1
kind: CronJob
metadata:
  name: scheduled-job
spec:
  schedule: "*/5 * * * *"
  timeZone: "Etc/UTC"
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: OnFailure
          containers:
            - name: job
              image: busybox:1.36
              command: ["/bin/sh", "-c", "date; echo running"]
  • spec.timeZone is stable since Kubernetes 1.27; without it, the kube-controller-manager’s zone applies. concurrencyPolicy: Forbid skips a run while the previous Job is still active.

Vercel Cron Jobs

vercel.json
{
  "crons": [
    { "path": "/api/cron", "schedule": "*/5 * * * *" }
  ]
}
  • Vercel always uses UTC, doesn’t accept names like MON or JAN, and won’t let you set both day of month and day of week.
  • This runs more than once a day, so it needs a Pro or Enterprise plan. Per Vercel’s docs, a Hobby deployment with an expression like this fails.

Cloudflare Workers

wrangler.toml
[triggers]
crons = ["*/5 * * * *"]
  • Cron Triggers run on UTC. Changes can take up to 15 minutes to propagate across Cloudflare’s network.

node-cron (Node.js)

scheduler.js
import cron from 'node-cron';

// 6 fields: the first one (seconds) is optional
cron.schedule('0 */5 * * * *', async () => {
  await runJob();
}, { timezone: 'UTC', noOverlap: true });
  • The schedule lives inside the Node process: if it’s down, nothing runs, and three replicas run the job three times. noOverlap skips a tick while the previous run is still going.

systemd timer

job.timer + job.service
# /etc/systemd/system/job.timer
[Unit]
Description=Run job.service every 5 minutes

[Timer]
OnCalendar=*:0/5

[Install]
WantedBy=timers.target

# /etc/systemd/system/job.service
[Service]
Type=oneshot
ExecStart=/usr/local/bin/job.sh

# systemctl daemon-reload && systemctl enable --now job.timer
  • Check it with systemd-analyze calendar '*:0/5', which prints the normalized form and the next elapse. AccuracySec defaults to 1min, so the start can drift by up to a minute.

Spring @Scheduled and Quartz

Java
@Scheduled(cron = "0 */5 * * * *", zone = "UTC")
public void runJob() {
    // ...
}

// Quartz CronTrigger:
CronScheduleBuilder.cronSchedule("0 0/5 * * * ?")
  • In Spring, the first of the 6 fields is seconds; the rest follow standard cron (0 or 7 = Sunday).
  • In Quartz, one of the two day fields must be ?, so the day-of-week field gets it.

Pitfalls

Everyone runs at :00, :05, :10

*/5 is the most common schedule there is, so shared databases and APIs get a burst on every multiple of 5. Shift yours with a start offset: 2-59/5 * * * * runs at 2, 7, 12, …, 57, still every 5 minutes.

It’s clock time, not “5 minutes after the last run finished”

If a run takes 4 minutes, the next one starts 1 minute after it ends. If it takes 6, the next starts while it’s still running. Use flock -n in crontab, concurrencyPolicy: Forbid in Kubernetes, or noOverlap in node-cron.

5 * * * * is not every 5 minutes

Without the slash, 5 in the minute field is a single value: once an hour, at minute 5. The step form is */5.

Frequently asked questions

What does */5 mean in a cron expression?
It’s a step value: every fifth value of the field’s range, starting from the lowest. In the minute field that’s 0, 5, 10, …, 55; in the hour field */5 would be 0, 5, 10, 15 and 20.
How do I run a cron job every 5 minutes starting at minute 2?
Use a range with a step: 2-59/5 * * * * runs at 2, 7, 12, …, 57. GitHub Actions and most libraries also accept 2/5, which cronie rejects.
Can GitHub Actions run every 5 minutes?
Yes, 5 minutes is the minimum GitHub allows. Runs are not guaranteed to be on time: GitHub’s docs say scheduled workflows can be delayed during high load, especially at the start of every hour.
How do I run every 5 minutes only on weekdays?
Add a day-of-week range: */5 * * * 1-5 runs every 5 minutes, all day, Monday to Friday.

Last reviewed by Arielton Oberek.