BackendBench
Coffee

Home โ€บ Cron errors โ€บ GitHub Actions

GitHub Actions ยท error

GitHub Actions: day-of-week must be 0-6

Why this happens

Some cron systems accept 7 for Sunday. GitHub Actions uses POSIX cron with 0-6, so 7 is out of range.

Wrong and right

wrong
0 0 * * 7

Our parser says: dow value 7 is out of range (0-6)

fixed
0 0 * * 0

At 00:00 UTC, on Sun. First runs after 1 Jan 2027 (UTC): Sun 03 Jan, 00:00, Sun 10 Jan, 00:00, Sun 17 Jan, 00:00, Sun 24 Jan, 00:00, Sun 31 Jan, 00:00

How to fix it

  1. Use 0 for Sunday.
  2. Or write SUN.
  3. Check the Actions tab for a schedule parse error after pushing.

The GitHub Actions format at a glance

Fields in order: minute (0-59), hour (0-23), day-of-month (1-31), month (1-12), day-of-week (0-6, 0 = Sunday).

GitHub Actions schedules are always UTC. Convert your local time to UTC before writing the expression.

The fixed schedule in other systems

If you are moving this schedule to another scheduler, these are the equivalents of 0 0 * * 0:

SystemExpression
Quartz0 0 0 ? * 1
Spring0 0 0 * * 0
Crontab0 0 * * 0
Kubernetes0 0 * * 0
AWS EventBridge0 0 ? * 1 *
Jenkins0 0 * * 0
node-cron0 0 * * 0
Apache Airflow0 0 * * 0
Azure Functions0 0 0 * * 0
Google Cloud Scheduler0 0 * * 0

Try it yourself

The tester below starts with the fixed expression. Change it and watch the schedule update.

Your week at a glance
fewer more runs

Upcoming runs

#LocalUTCFrom now

Copy-ready code

Frequently asked questions

Why did my workflow vanish from the schedule?

An invalid cron makes GitHub ignore the schedule trigger. Check the workflow file for errors.

More GitHub Actions fixes

See the full GitHub Actions cron builder or convert between formats.

More tools you might need