[comp.sys.sgi] Problems with cron

meyer@unizh.UUCP (04/27/88)

Hi out there,

We are experiencing problems with cron. Sporadically it executes a command
setup in some crontab entry twice. An excerpt from the cron log is shown
below.

Has anybody noticed this problem? What can be done to get around it?

Our environment: 4D/70G, Unix Release 4D1-2.0

						Urs Meyer

-------
cron log (/usr/lib/cron/log):

>  CMD: /usr/lib/sa/sa1
>  sys 1994 c Wed Apr 27 04:00:00 1988 
<  sys 1994 c Wed Apr 27 04:00:00 1988
>  CMD: /usr/lib/sa/sa1
>  sys 2001 c Wed Apr 27 04:59:59 1988  < 1.
<  sys 2001 c Wed Apr 27 05:00:00 1988
>  CMD: /usr/lib/sa/sa1
>  sys 2004 c Wed Apr 27 05:00:00 1988  < 2.
<  sys 2004 c Wed Apr 27 05:00:00 1988
>  CMD: /etc/dump/daydmp 2>&1 | /bin/mail root
>  root 2011 c Wed Apr 27 05:59:59 1988 < 1.
>  CMD: /usr/lib/sa/sa1
>  sys 2021 c Wed Apr 27 06:00:00 1988
>  CMD: /etc/dump/daydmp 2>&1 | /bin/mail root
>  root 2023 c Wed Apr 27 06:00:00 1988 < 2.	really don't like to dump twice
<  sys 2021 c Wed Apr 27 06:00:03 1988
<  root 2023 c Wed Apr 27 06:00:46 1988
<  root 2011 c Wed Apr 27 06:02:34 1988
>  CMD: /usr/lib/sa/sa1
>  sys 2204 c Wed Apr 27 06:59:59 1988	< 1. 
>  CMD: /usr/lib/sa/sa1
>  sys 2207 c Wed Apr 27 07:00:00 1988  < 2.
<  sys 2204 c Wed Apr 27 07:00:00 1988
<  sys 2207 c Wed Apr 27 07:00:01 1988

crontabs:

# crontabs/sys
0		* * * 0-6	/usr/lib/sa/sa1
20,40	     8-17 * * 1-5	/usr/lib/sa/sa1
5 	       18 * * 1-5	/usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A

# crontabs/root
...
5	6 * * 2-6	/etc/dump/daydmp 2>&1 | /bin/mail root
...

--------------------------------------------------------------------------
Urs Meyer, University of Zuerich,        UUCP:   mcvax!cernvax!unizh!meyer
Computer Science Dept., 8057 Zuerich     CHUNET: meyer@ifi.unizh.ch
Switzerland

ktureski@alias.UUCP (Kevin Tureski) (04/29/88)

	Has anybody noticed [that cron tends to run things twice]? What can 
	be done to get around it?
	Our environment: 4D/70G, Unix Release 4D1-2.0
	
							Urs Meyer
	
Yes, we've noticed it and complained about it. The answer: wait for 3.0. Now 
we've got 3.0 (an early VAR release) and the problem has disappeared. In the
meantime, you might consider a simple lockout mechanism for your own commands
that are to be run via the crontab. If you're not sure whether cron is running
things twice, then try the following entry in a crontab:

	00,10,20,30,40,50 * * * * date >> /tmp/date


Kevin Tureski
Alias Research Inc.
110 Richmond St E. 
Toronto Canada M5C 1P1
416 362-9181

UUCP:	{allegra,ihnp4,watmath!utai}!utcsri!alias!ktureski