A job written as 0 0 1 * 1 was meant to run on the first of the month, but only when that day was a Monday. It ran about sixty times that year. Cron had read the expression as an OR.
Field order, one line each
| Field | Range | Notes |
|---|---|---|
| minute | 0–59 | */5 means 0, 5, 10 … 55 |
| hour | 0–23 | 24-hour clock, no AM/PM |
| day of month | 1–31 | skipped in months that are too short |
| month | 1–12 | January is 1 |
| day of week | 0–6 | 0 is Sunday, 1 is Monday |
The crontab generator builds exactly these five fields — no seconds column, so it matches a standard Linux crontab, not Quartz.
Four myths worth deleting
1. “Day of month and day of week are ANDed.” In classic Vixie cron, when both fields are restricted, the job runs when either matches. 0 0 1 * 1 fires on the 1st and on every Monday. If you need a real AND, schedule by date and filter inside the job:
# cron: 0 0 1 * * — runs on the 1st, exits unless it is a Monday
[ "$(date +%u)" = "1" ] || exit 0
2. “*/5 means every five minutes from the last run.” It means clock-aligned minutes 0, 5, 10 … 55. Schedule a job every 5 minutes that takes 7, and each run overlaps the next; there is no drift, only pileup.
3. “Cron uses my timezone.” There is no timezone in the expression. It uses the server’s local time, and containers are usually UTC, so a “midnight” job can fire at 8 a.m. your time. On DST days, the missing spring hour is skipped and the duplicated autumn hour can run twice.
4. “The explanation line is the full specification.” The generator prints a plain-English sentence built from your fields. It does not mention the OR rule or the timezone. Use it to check the shape of the schedule, not its meaning.
The business-hours line
*/15 9-18 * * 1-5 runs every 15 minutes on weekdays from 09:00 through 18:45. Hour 18 is included in full, so the final run is 18:45 — after most offices close. If 18:45 is too late, write 9-17 and the day ends at 17:45.
Read the expression back to yourself field by field, out loud: “at minute 0, of hour 3, on any day, in any month, on any weekday.” If the sentence does not match what you meant, the job will not either.