Skip to content
toolbelt
Back to Guides

That Cron Expression Runs at the Wrong Time

By ·

Updated

You wrote 0 0 * * 1 and expected Mondays. Here is why day-of-week and day-of-month interact badly.

What is this tool?

Cron is five fields: minute, hour, day of month, month, day of week. The fifth field is where most bugs live.

How it works

I parse the expression and translate it to English, then compute the next five run times from now so you can confirm the schedule you actually wrote.

Example

0 0 * * 1

Translation: At 00:00, only on Monday.
Next runs: Mon 02/12 00:00, Mon 09/12 00:00, Mon 16/12 00:00

When to use it

Before deploying any scheduled job. Especially anything that touches billing, notifications or cleanup, where a bad schedule is expensive.

Optimization Tips

Watch the timezone. Almost every scheduler uses UTC unless configured otherwise, and that is the difference between a 9am reminder and a 4am one. Also avoid */5 in the minute field if you meant every five minutes relative to the hour — it does mean that, but people misread it.

Frequently Asked Questions

What does day-of-week 0 mean?
Sunday in most implementations, but 7 also means Sunday in some. Use names where possible.
Why does my job skip a month?
Check whether you used the month field for day-of-week by mistake. Field order is the most common error.
Can I run every 90 minutes?
Not in plain cron. The fields do not express intervals longer than an hour cleanly; use a different scheduler.
Which crontab format is this?
Standard five-field Vixie cron, which Linux, most serverless schedulers and GitHub Actions all accept.

Ready to try it out?

Put this knowledge into practice with our free tool.

Go to Tool

Related tools