crontab: Sunday=7, not 0.
Edward C. Bennett
edward at ukecc.UUCP
Wed Oct 30 06:25:53 AEST 1985
In article <2935 at sun.uucp>, guy at sun.uucp (Guy Harris) writes:
> > >> By the way, the man page for cron(8) lies. It says that the
> > >> days are numbered 1-7 with 1=Monday. The days are actually
> > >> numbered 0-6 with 0=Sunday.
> > >
> > >I tried it on my Sun and he is incorrect. On a Sunday, I added two
> > >entries, one for day 7 and one for day 0, at the same time (a few minutes
> > >hence). The one with day 7 ran, with day 0 didn't. QED.
> >
> > Sunday is 0 on my system (still 4.1 BSD, sigh).
>
> I believe the V7 man page lied; it said the days went 1-7 with 1=Monday,
> when the actually went 0-6 with 0-Sunday. The USG/USDL (people who brought
> you S3/S5) fixed the man page. The CSRG at UCB (people who brought you
> 4.xBSD) fixed the *code* in 4.2. They should have known better - if UNIX
> code and UNIX documentation disagree, 99 times out of 100 (if not more
> often), the documentation is wrong. Thus, 4.2BSD's "cron" is out of sync
> with every other "cron" out there.
> Guy Harris
On our 2.9BSD system, cron treats the days the same way localtime(3)
does, 0-6, 0=Sunday. Our manual page did indeed say 1-7, 1=Monday. A quick
edit of cron.8 fixed everything.
--
Edward C. Bennett
UUCP: ihnp4!cbosgd!ukma!ukecc!edward
/* A charter member of the Scooter bunch */
"Goodnight M.A."
More information about the Comp.unix
mailing list