A cron job that silently never runs is one of the most frustrating faults in computing, because nothing complains. There is no error page and no crash report: the backup simply is not there in the morning. The good news is that the list of possible causes is short, and most of them can be checked in a definite order, starting with the one you can prove from your desk: the expression itself.

This guide works through the causes in that order: first the expression, then the clock, then the day fields, and only then the server itself. The checking tool throughout is the free Cron Expression Builder on Ovatly, which explains any expression in plain English and lists its next five run times in your local time zone.

Contents

  • Quick answer
  • Cause 1: the expression does not say what you think it says
  • Cause 2: the server clock is not your clock
  • Cause 3: the two day fields are working against you
  • Cause 4: the problem is on the server, not in the expression
  • How to check an expression, step by step
  • Worked example: a backup that fired on Mondays
  • Limitations and honest notes
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Work in this order. One: paste the expression into the Cron Expression Builder and read its plain-English description and next five run times; if they surprise you, the expression is wrong, usually a field in the wrong position or a value outside its range. Two: the run times are shown in your local time while most servers schedule in UTC, so a correct expression can still fire hours away from when you expect. Three: if both day fields are restricted, cron fires when either matches, which adds days. Four: if all of that is clean, the fault is on the server.

Cause 1: the expression does not say what you think it says

A cron expression is five unlabeled fields, and the two easiest ways to break one are ordering and range. The order is minute first, then hour. Write an expression as if the hour came first and a job meant for 09:30 becomes a job set for minute 9 of hour 30, which does not exist, so it never fires at all. Range errors are just as silent: a minute of 60, an hour of 24, a month of 13 never match anything, and the job is dead without a message.

Weekday numbering catches people too. Day of week runs 0-7, and both 0 and 7 mean Sunday, so 1 is Monday, not Sunday. A weekly job written with 1 by someone counting Sunday as the first day runs on Mondays forever. None of these faults can be spotted by staring at five small numbers, which is why the expression check below exists.

Cause 2: the server clock is not your clock

Suppose the expression is provably right and the job does run, just at an hour nobody wanted. The usual explanation is time zones. The builder calculates next run times in your browser's local time. Servers usually run cron in UTC, so an expression that reads as 09:00 on your screen fires at 09:00 in the scheduler's zone. If you are five hours ahead of UTC, your 09:00 job fires at 14:00 your time, every day, correctly, and looks broken the whole time. The fix is to write the hour field in the server's zone.

Cause 3: the two day fields are working against you

Standard cron has one behaviour that surprises nearly everyone once. When both the day-of-month and day-of-week fields are restricted, a day matches if either field matches, not only when both do. So an expression pinned to the 1st of the month and to Mondays does not mean "Mondays that fall on the 1st". It fires on the 1st of every month and on every Monday: five or six runs a month instead of a rare one. The fix is simple: restrict one day field and leave the other as an asterisk. The companion guide linked at the end works through this trap in detail.

Cause 4: the problem is on the server, not in the expression

If the expression reads back exactly as intended, the time zone maths is done, and only one day field is restricted, then the expression is not your problem. The remaining causes live on the machine. The cron service itself may be stopped or not installed, so nothing reads the crontab at all. The line may sit in a different user's crontab than the one the job needs. And a script that runs happily from your terminal can fail under cron, because cron gives it a minimal environment: commands found through your shell's PATH may not resolve, and relative paths point somewhere else. These are general server facts, not things any expression tool can see.

How to check an expression, step by step

  1. Open the Cron Expression Builder.
  2. Paste your existing expression into the lower field.
  3. Read the plain-English description it gives back, and compare it with the schedule you intended, especially the time and the days.
  4. Read the next five run times listed below it, in your local time. Check the actual dates: a weekly job should show seven-day gaps, a monthly job the same date each time.
  5. If the description is wrong, rebuild the schedule from the pattern list at the top of the builder and use the generated expression instead.

Worked example: a backup that fired on Mondays

A monthly backup was supposed to run at midnight on the first of the month. The crontab held 0 0 1 * 1, written by someone who reasoned that the last field "had to be something" and picked 1 for "first". Pasting that expression into the builder describes a schedule that fires at 00:00 when either the day of month is 1 or the weekday is Monday, and its next-run list shows the proof: the coming Monday, then the next Monday, then the 1st. Deleting the stray weekday to get 0 0 1 * * leaves one restricted day field, and the next-run list then shows only firsts of the month.

Limitations and honest notes

The builder covers standard five-field cron only. Seconds and year fields from Quartz-style schedulers are not included, so a longer expression needs those fields removed before the builder can explain it.

The builder verifies expressions. It cannot inspect your server, read your crontab, or run your script, so it cannot detect a stopped service, a wrong crontab or a permissions failure. Its next run times are calculated in your local time zone, which is a display choice, not a promise about when a UTC server will fire.

Common mistakes

  • Writing the hour before the minute. The order is minute, hour, day of month, month, day of week. Swapping the first two fields produces a schedule that fires at wrong times or never.
  • Using a value outside its range. Minute 60, hour 24 and month 13 match nothing.
  • Counting Sunday as 1. Standard numbering: 0 and 7 are Sunday, 1 is Monday.
  • Restricting both day fields. Day of month plus day of week behaves as either-or, adding firing days.
  • Blaming the expression for a server fault. If the builder reads it back exactly as intended, stop editing it and check the server.

FAQs

How do I check whether my cron expression is correct? Paste it into the Cron Expression Builder. It explains the expression back to you in plain English and lists the next five run times in your local time zone. If the description or the dates are not what you intended, the expression is the problem.

Why does my job run hours earlier or later than expected? The builder lists run times in your local time zone, but most servers schedule in UTC. An expression set for 09:00 fires at 09:00 UTC on the server, which can be several hours away from 09:00 where you are.

Why does my job run on extra days I never asked for? When both the day-of-month and day-of-week fields are restricted, standard cron fires when either field matches, not only when both do. A schedule pinned to the 1st and to Mondays fires on the 1st and on every Monday.

My expression is right but the job still never runs. What now? The fault is on the server side: the cron service may be stopped, the line may sit in another user's crontab, or the script itself may fail on paths or permissions. The builder can only verify the expression, not the machine.

Can the builder read a Quartz expression with seconds? No. It covers standard five-field cron only: minute, hour, day of month, month, day of week. Seconds and year fields from Quartz-style schedulers are not included, so trim those fields before pasting.

Conclusion

Debugging a silent cron job is mostly a matter of order: prove the expression first, because that is the part you can check in a minute with the Cron Expression Builder, then do the time zone maths, then look at the day fields, and only then go to the server. If your goal is a clean monthly schedule rather than a rescue, the companion guide on how to schedule a job for the first day of every month builds one from scratch, and the rest of this category lives in the Developer Tools guides archive.