BackendBench
Coffee

Home โ€บ Cron errors โ€บ Crontab

Crontab ยท error

crontab error: bad minute

crontab: installing new crontab
"/tmp/crontab.xxxx":1: bad minute
errors in crontab file, can't install.

Why this happens

The minute field only allows 0-59. Writing 60 for "every hour" is a common slip.

Wrong and right

wrong
60 * * * *

Our parser says: min value 60 is out of range (0-59)

fixed
0 * * * *

At minute 0. First runs after 1 Jan 2027 (UTC): Fri 01 Jan, 01:00, Fri 01 Jan, 02:00, Fri 01 Jan, 03:00, Fri 01 Jan, 04:00, Fri 01 Jan, 05:00

How to fix it

  1. Use 0 for the top of the hour.
  2. Use */N for intervals within the hour.
  3. Run crontab -l after saving to confirm the line was installed.

The Crontab 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-7, 0 and 7 = Sunday).

Cron runs in the server's local time zone. Check it with the date command, or put CRON_TZ=Asia/Kolkata above the line on cronie-based systems.

The fixed schedule in other systems

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

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

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

What does "bad hour" or "bad day-of-week" mean?

The same thing for another field: hours are 0-23, day-of-week is 0-7.

More Crontab fixes

See the full Crontab cron builder or convert between formats.

More tools you might need