Developer Toolbox

Cron: every 6 hours

Four runs a day, six hours apart, starting at midnight. The list 0 0,6,12,18 * * * says the same thing and makes the hours explicit.

Open in Cron Parser The expression is filled in: change it and watch the next runs.

Expression

0 */6 * * *
Meaning

At minute 0 past every 6th hour: 00:00, 06:00, 12:00, 18:00

Next 5 runs

Your time zone

The same schedule on other platforms

PlatformWritten asNote
Linux crontab0 */6 * * *Five fields, in the server's local time zone. A % in the command has to be escaped as \%.
GitHub Actions- cron: '0 */6 * * *'Five fields, in UTC unless a timezone (an IANA name such as Europe/Warsaw) is set next to cron. Default branch only. The shortest interval is 5 minutes; when GitHub is busy, runs start late and some are dropped.
Kubernetes CronJobschedule: "0 */6 * * *"Five fields, in the controller's time zone unless spec.timeZone is set (Kubernetes 1.27 and later). concurrencyPolicy decides what happens when runs overlap.
systemd timerOnCalendar=0/6:00Its own calendar syntax, in a .timer unit, local time. hourly, daily and monthly match cron, but weekly means Monday. Persistent=true catches up on runs missed while the machine was off.
AWS EventBridgecron(0 0/6 * * ? *)Six fields, the last one the year; one day field must be ?, and day of week 1 is Sunday. Rules run in UTC; EventBridge Scheduler accepts a time zone.
Quartz / Spring0 0 0/6 * * ?Six fields, seconds first. Quartz needs ? in one of the day fields and counts Sunday as 1; Spring accepts ? and numbers days like cron.

Common mistakes

  • Which midnight?

    The hours are in the server's time zone, and in UTC in EventBridge rules and on GitHub Actions unless the workflow sets a timezone. 00:00 UTC is 01:00 or 02:00 in Central Europe, and the evening before in the Americas.

  • Other hours

    Move the start of the range: 0 3-23/6 * * * runs at 03:00, 09:00, 15:00 and 21:00.

  • 0 6 * * * is once a day

    Without the slash, 6 is a single hour: 06:00, every day.