Day-of-week/day-of-month conflicts, interval misconceptions, overlapping jobs
1. Day-of-week number confusion — In cron, the day of week ranges from 0 to 6, where 0 is Sunday. Many implementations also accept 7 as Sunday, but mistaking 1 for Sunday and being off by a day is a common error. Monday is 1 and Friday is 5.
2. Setting both day-of-month and day-of-week — If you set both fields to something other than *, most cron implementations run the job when either one matches (OR, not AND). For example, 0 0 13 * 5 runs on 'the 13th or every Friday'. It is not 'only on Friday the 13th'.
3. Misunderstanding the */n interval — */15 means an interval of 15 starting from 0, i.e. it runs at minutes 0, 15, 30, and 45. If you use a value that doesn't divide 60 evenly, like */40, it runs only at minutes 0 and 40 and then skips to minute 0 of the next hour, making the interval irregular.
4. Time zone assumptions — cron usually runs in the server's time zone (typically UTC). If you write an expression based on your local time, it will actually run at a different time. Time zones are covered in detail in a separate guide below.
5. Overlapping jobs — If a run takes longer than the next scheduled time, a new job can start again before the previous one finishes. For long-running jobs, it's safer to add a lock or a guard against concurrent execution. Verify the expression you wrote in advance using the next run times in the tool above.