← All posts

Three Cron Pitfalls That Will Bite You

June 12, 2026 · The CronLabs Team

Cron syntax looks deceptively simple: five fields, a few wildcards, done. But a handful of edge cases catch even experienced engineers. Here are three.

1. Day-of-month AND day-of-week is an OR, not an AND

This is the big one. When both the day-of-month (field 3) and day-of-week (field 5) are restricted, cron runs when either matches:

0 0 13 * 5

You might read that as "midnight on Friday the 13th." It actually means "midnight on the 13th of every month, and every Friday." Two very different schedules.

2. The 31st doesn't exist every month

0 0 31 * *

This skips February, April, June, September, and November entirely. If you need "the last day of the month," reach for a scheduler that supports L, or compute it in your job.

3. Timezones drift under daylight saving

A job set for 0 2 * * * (2am daily) will either run twice or not at all on the days the clocks change, depending on your timezone. Schedule sensitive jobs outside the 1am–3am window, or pin them to UTC.


Want to sanity-check a schedule before you ship it? Paste it into the CronLabs validator and watch the next ten runs.