Day-of-week: Allowed range 0 – 7. Sunday is either 0 or 7.
I found this after Googling, my question is why should both values (0,7) correspond to Sunday?
This is a matter of portability. In early Unices, some versions of cron accepted 0 as Sunday, and some accepted 7 as Sunday -- this format is an attempt to be portable with both. From
man 5 crontab in vixie-cron (emphasis my own):
When specifying day of week, both day 0 and day 7 will be considered Sunday. BSD and AT&T seem to disagree about this.
In addition to @ChrisDown's excellent answer, this might also be a nifty solution to a localisation issue: "According to the Hebrew calendars and traditional Christian calendars, Sunday is the first day of the week." Having it both ways, which is really easy programmatically, makes it easy to use for either group.
More simply, the field is 3 binary bits giving you 000 through 111 or 0 through 7. So there are a total of eight values in a 3 bit field. The extra value is equated to the first so, for convenience sake, you can start at 0 (Sunday) or 1 (Monday), increment 6 times and cover a full week.
day of week (0 - 7) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)