[net.unix] crontab: Sunday=7, not 0.

gnu@l5.uucp (John Gilmore) (10/09/85)

Shore@adobe.UUCP (Andrew Shore) wrote:
> 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.

haral@ttidcb.UUCP (Haral Tsitsivas) (10/23/85)

In article <187@l5.uucp> gnu@l5.uucp (John Gilmore) writes:
>Shore@adobe.UUCP (Andrew Shore) wrote:
>> 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).

guy@sun.uucp (Guy Harris) (10/27/85)

> >> 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.  Sigh.  (Admittedly, the S5R2 "cron" is
also somewhat different; "crontab"s have the same format, but they live in
different places and every user gets one of their own, to have, hold, and
alter.)

	Guy Harris

chris@umcp-cs.UUCP (Chris Torek) (10/28/85)

In article <2935@sun.uucp> guy@sun.uucp (Guy Harris) writes:
> 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 . . . .

Do not be too hard on them:  at least they did something about it.

The solution now is probably to make 0=7=Sunday everywhere.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@mimsy.umd.edu

levy@ttrdc.UUCP (Daniel R. Levy) (10/29/85)

In article <2935@sun.uucp>, guy@sun.uucp (Guy Harris) writes:
>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.
>	Guy Harris
Rhetorical question:  how is "wrong" defined.  Does the documentation being
"wrong" mean that the way the code is different from the way it is implemen-
ted is on purpose?  That is, there has to be something that shows that the
code was designed that way on purpose to prove that the documentation is
"wrong."  Of course since the code function is usually documented after it is
written :-) then if the documentation and code differ then the documentation
is ipso facto, "wrong."
-- 
 -------------------------------    Disclaimer:  The views contained herein are
|       dan levy | yvel nad      |  my own and are not at all those of my em-
|         an engihacker @        |  ployer or the administrator of any computer
| at&t computer systems division |  upon which I may hack.
|        skokie, illinois        |
 --------------------------------   Path: ..!ihnp4!ttrdc!levy

trb@haddock.UUCP (10/29/85)

>>>> 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.

This problem has been around for a long time.  Numbering weekdays with
Sunday==0 is a pretty alien idea to most of us, I think.  As long as
we're stuck with cron's day numbering scheme, I'd say that the safe way
to fix it is to hack your cron to accept both 0 and 7 for Sunday.
Then your documentation will be right, no matter how many times people
fix it.

	Andrew Tannenbaum   Interactive   Boston, MA   617-247-1155
	(Not masscomp!trb, ima!trb.  Same person, different address.)

edward@ukecc.UUCP (Edward C. Bennett) (10/29/85)

In article <2935@sun.uucp>, guy@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."

geoff@desint.UUCP (Geoff Kuenning) (10/31/85)

In article <2006@umcp-cs.UUCP> chris@umcp-cs.UUCP (Chris Torek) writes:

>The solution now is probably to make 0=7=Sunday everywhere.

I should probably keep my mouth shut until it's done, but I can't stand
this discussion.  I hope to be putting my new "supercron" out to a few
beta sites in a couple of months.  Since I'm a wild extremist radical who
believes computers should bend to the convenience of mankind, it doesn't
take EITHER 0 or 7 for Sunday.  It takes "Sun".  (Except in "furrin"
places, where a #define lets you put in your own language's abbreviations).
-- 

	Geoff Kuenning
	{hplabs,ihnp4}!trwrb!desint!geoff

leif@erisun.UUCP (Leif Samuelsson) (11/10/85)

In article <2006@umcp-cs.UUCP> chris@umcp-cs.UUCP (Chris Torek) writes:
>> 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 . . . .
>
>Do not be too hard on them:  at least they did something about it.
>
>The solution now is probably to make 0=7=Sunday everywhere.

If anyone decides to write a brand new version of Unix, then
this should be put straight once and for all. It is now over 15
years since ISO decided that Monday is the first day of the
week. Hence, we can number the days 0-6 or 1-7, but Monday
should be first!


Leif Samuelsson

Ericsson Information Systems AB			..enea!erix!erisun!leif
Advanced Workstations Division
S-172 93  SUNDBYBERG				59 19 N / 17 57 E
SWEDEN

larry@kitty.UUCP (Larry Lippman) (11/12/85)

> (Admittedly, the S5R2 "cron" is
> also somewhat different; "crontab"s have the same format, but they live in
> different places and every user gets one of their own, to have, hold, and
> alter.)

	I had a lot of "fun" with the new `cron' arrangement when we upgraded
our 3B2 to Sys V Release 2.  Since I had many things on my mind to get our
upgraded machine back into service, I never CAREFULLY read the doc's on crontab
use to discover the ``crontab'' COMMAND.  So, I merely edited the default
file for /usr/spool/cron/crontabs/root with my additional crontab entries -
which promptly did not work.  I tried this several times, and no matter what
I put in that crontab file, nothing would execute unless I rebooted the system.
Even the AT&T Hotline did not know what was wrong.
	Finally, I discovered the ``crontab'' COMMAND and READ the manual page.
Success - it worked.
	My question: does anyone know why simply editing the particular crontab
file will not work, and why the crontab command MUST be used?

===  Larry Lippman @ Recognition Research Corp., Clarence, New York        ===
===  UUCP    {decvax,dual,rocksanne,rocksvax,watmath}!sunybcs!kitty!larry  ===
===  VOICE   716/741-9185		 {rice,shell}!baylor!/             ===
===  FAX     716/741-9635 {AT&T 3510D}	             ihnp4!/               ===
===									   ===
===                   "Have you hugged your cat today?"		           ===

medin@noscvax.UUCP (Ted Medin) (11/14/85)

In article <379@erisun.UUCP> leif@erisun.UUCP (Leif Samuelsson) writes:
>In article <2006@umcp-cs.UUCP> chris@umcp-cs.UUCP (Chris Torek) writes:
>>> 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 . . . .
>>
>>Do not be too hard on them:  at least they did something about it.
>>
>>The solution now is probably to make 0=7=Sunday everywhere.
>
>If anyone decides to write a brand new version of Unix, then
>this should be put straight once and for all. It is now over 15
>years since ISO decided that Monday is the first day of the
>week. Hence, we can number the days 0-6 or 1-7, but Monday
>should be first!
>
 For several hundred years sunday has been the first day of the
week. Look at any calandar.

edward@ukecc.UUCP (Edward C. Bennett) (11/19/85)

In article <573@kitty.UUCP>, larry@kitty.UUCP (Larry Lippman) writes:
> 	My question: does anyone know why simply editing the particular crontab
> file will not work, and why the crontab command MUST be used?
> 
> ===  Larry Lippman @ Recognition Research Corp., Clarence, New York        ===

	On our 3B20 we found that the only way to get cron to reread
/usr/spool/cron/crontabs/* was to kill and restart /etc/cron.

-- 
Edward C. Bennett

UUCP: ihnp4!cbosgd!ukma!ukecc!edward

/* A charter member of the Scooter bunch */

"Goodnight M.A."

overlord@nmtvax.UUCP (11/25/85)

>>this should be put straight once and for all. It is now over 15
>>years since ISO decided that Monday is the first day of the
>>week. Hence, we can number the days 0-6 or 1-7, but Monday
>>should be first!
>>
> For several hundred years sunday has been the first day of the
>week. Look at any calandar.

That was rather closeminded and uninformed.  For your information many
(most?) European calanders start with monday and have saturday and sunday
(the weekEND) at the end of the week.  Just because most US calandars start
with sunday doesn't mean they all do!

                                            Alan Kerr
                                            New Mexico Tech

-- 
...{convex,ucbvax,gatech,csu-cs,anl-mcs}!unmvax!nmtvax!overlord
                         ...{purdue,cmc12}!lanl!nmtvax!overlord

mike@rlvd.UUCP (Mike Woods) (11/25/85)

In article <100@noscvax.UUCP> medin@cod.UUCP (Ted medin) writes:
>In article <379@erisun.UUCP> leif@erisun.UUCP (Leif Samuelsson) writes:
>>If anyone decides to write a brand new version of Unix, then
>>this should be put straight once and for all. It is now over 15
>>years since ISO decided that Monday is the first day of the
>>week. Hence, we can number the days 0-6 or 1-7, but Monday
>>should be first!
>>
> For several hundred years sunday has been the first day of the
>week. Look at any calandar.

For at least the last two and a half thousand years Sunday has been
the first day of the week. How on Earth can ISO decide to run
counter to the whole (well almost) of humanity and announce that
Monday is the "standard" first day of the week. I find this somewhat
pathetic.

Mike Woods.
-- 

UK JANET:	mike@uk.ac.rl.vd
UUCP:		..!mcvax!ukc!rlvd!mike

tim@ISM780B.UUCP (11/28/85)

Come on, guys!  Everyone knows that Saturday is 0, Sunday is 1, ...
Friday is 6.

					Tim Smith
					ihnp4!cithep!tim
					ima!ism780!tim

andersa@kuling.UUCP (Anders Andersson) (11/29/85)

In article <883@nmtvax.UUCP> overlord@nmtvax.UUCP (Alan Kerr) writes:
>>>this should be put straight once and for all. It is now over 15
>>>years since ISO decided that Monday is the first day of the
>>>week. Hence, we can number the days 0-6 or 1-7, but Monday
>>>should be first!

>(the weekEND) at the end of the week.  Just because most US calandars start
>with sunday doesn't mean they all do!

So THAT is the reason the numerical representation for the weekdays
was "inappropriately" defined from the very beginning!? Oh well...

Now as we seem to agree about facts, can we decide whether there is
reason enough to *change* the original definition in an existing
operating system, as was suggested in the first place? If there is
any risk for incompatibility with earlier software, I'm afraid that
would do more harm than good, but perhaps some systems development
expert could make out the details?
-- 
Anders Andersson, Dept. of Computer Systems, Uppsala University, Sweden
Phone: +46 18 183170
UUCP: andersa@kuling.UUCP (...!{seismo,mcvax}!enea!kuling!andersa)

jo@epistemi.UUCP (Jo Calder) (11/30/85)

In article <947@rlvd.UUCP> mike@rlvd.UUCP (Mike Woods) writes:
>
>For at least the last two and a half thousand years Sunday has been
>the first day of the week. How on Earth can ISO decide to run
>counter to the whole (well almost) of humanity and announce that
>Monday is the "standard" first day of the week. I find this somewhat
>pathetic.
>
>Mike Woods.
>-- 
>
>UK JANET:	mike@uk.ac.rl.vd
>UUCP:		..!mcvax!ukc!rlvd!mike

Try telling that to the Chinese.  There are considerably
more of them than there are USENET users, and they all say
a rough equivalent of 

week1   ...... week6 	  
Monday         Saturday

Sunday doesn't follow the above pattern, but then nothing
is perfect.

-- 
    ----------------------------------------------------------------------
    
    Jonathan Calder, University of Edinburgh, 
    		     Centre for Cognitive Science,
		     2 Buccleuch Place, 
		     Edinburgh, EH8 9LW,
		     Scotland
    ...!seismo!mcvax!ukc!cstvax!epistemi!jo

You run your mouth and I'll run my business.

mulligan@u-mt.UUCP (J. Scott Mulligan) (12/02/85)

In article <947@rlvd.UUCP>, mike@rlvd.UUCP (Mike Woods) writes:
.
.
> For at least the last two and a half thousand years Sunday has been
> the first day of the week.
.
.
> ...I find this somewhat pathetic.
> 
> Mike Woods.
> -- 
> UK JANET:	mike@uk.ac.rl.vd
> UUCP:		..!mcvax!ukc!rlvd!mike

What I find pathetic is the fact that we seem to have so many
"professional" people littering the net with this discussion.
C'mon folks, who really CARES?  What possible difference does it
make whether we put a '0' or a '7' in our crontab for Sunday?

jso@edison.UUCP (John Owens) (12/03/85)

> Now as we seem to agree about facts, can we decide whether there is
> reason enough to *change* the original definition in an existing
> operating system, as was suggested in the first place? If there is
> any risk for incompatibility with earlier software, I'm afraid that
> would do more harm than good, but perhaps some systems development
> expert could make out the details?
> -- 
> Anders Andersson, Dept. of Computer Systems, Uppsala University, Sweden

If anyone is planning on changing cron, don't just change the numbers!
Leave the numbers the same so you don't confuse everyone, and allow
"Mon", "Tue",...  Also, "Jan", "Feb", etc...

-- 

			   John Owens
General Electric Company		Phone:	(804) 978-5726
Factory Automated Products Division	Compuserve: 76317,2354
	       decvax!mcnc!ncsu!uvacs
...!{		 gatech!allegra!uvacs	}!edison!jso
			  ihnp4!houxm