Sunday written as 7
0 0 * * 70 0 * * 0In the day-of-week field the week is numbered 0 to 6, Sunday through Saturday. As a convenience, many cron implementations also accept 7 as an alias for Sunday, so the week can be read 1 (Monday) through 7 (Sunday) if you prefer. Both 0 0 * * 0 and 0 0 * * 7 therefore mean "every Sunday" on those systems.
The wrinkle is portability. The 7-for-Sunday alias is common but not universal: some stricter parsers, and some non-cron schedulers that borrow cron syntax, reject 7 as out of range because their day-of-week field is defined as 0–6. An expression that runs fine on your Linux box can fail to load on another platform for this one reason.
This is only an informational note — if your target system accepts 7, nothing is broken. But because 0 is accepted everywhere and 7 is not, 0 is the safer default, especially in code you might move between platforms or hand to someone else. Some tools also silently normalise 7 to 0 when they rewrite a crontab, which can produce confusing diffs if half your entries use each form.
A related gotcha: mixing the two conventions in a range. 5-7 is read by the parser as "Friday through Sunday", keeping the 7 as an endpoint so the range direction stays meaningful, and Sunday is folded to 0 only once the range is expanded. If you write day-of-week ranges, sticking to the 0–6 numbering avoids any doubt about where the week starts and ends. When in doubt, use 0 for Sunday and name the others with SUN–SAT if your cron supports names.
Watch the linter flag it live — the finding below appears the moment the expression is entered: