cron jobs run twice
James T. Talley
talley at hpuxa.ircc.ohio-state.edu
Fri Mar 15 07:09:06 AEST 1991
I suspect that my question may fall into the novice sys admin
category. The problem is simple -- every job I put into a crontab
file seems to be run twice. The cron log shows two separate entries
for each job and frequently the second one will give error messages
because the files it wants are busy. This is on a Mac IIci with A/UX
2.0 (A/UX delphic 2.0 SVR2 mc68030). The cron jobs I've tried are for
system accounting, UUCP, and simply testing the cron problem (see
documentation below).
There are some exceptions. Sometimes the first run will be a single
shot as it should. If I artificially load the system (for example
with about ten instances of "ls -lR | compress | uncompress >
/dev/null &", I can sometimes make the second run diasappear.
I've tried the manual, and a couple of other newsgroups. If anyone
has any ideas, I'd appreciate hearing them.
Thanks,
James Talley
talley+ at osu.edu
---------- Warning: long captured session ----------
---------- documenting cron problem follows ----------
delphic.root 1 # date
Thu Mar 14 09:22:32 EST 1991
delphic.root 2 # who
root ttyp0 Mar 14 09:21 (tazewell)
root ttyp1 Mar 14 09:22 (tazewell)
delphic.root 3 # crontab -r
delphic.root 4 # crontab
0,10,20,30,40,50 * * * * date >> /root/test
warning: commands will be executed using /bin/sh
delphic.root 5 # crontab -l
0,10,20,30,40,50 * * * * date >> /root/test
delphic.root 6 # ll /usr/spool/cron/crontabs
total 2
-r--r--r-- 1 root adm 0 Mar 13 18:10 adm
-rw-r--r-- 1 root root 0 Apr 5 1989 crontab
-rw-r--r-- 1 lp lp 0 Apr 5 1989 lp
-r--r--r-- 1 root adm 44 Mar 14 09:23 root
delphic.root 7 # ps -ef
UID PID PPID C STIME TTY TIME COMMAND
root 0 0 0 Mar 11 ? 0:02 swapper
root 1 0 0 Mar 11 ? 0:16 /etc/init
root 2 0 0 Mar 11 ? 0:09 vhand
root 109 1 0 Mar 11 ? 0:00 /usr/lib/lpd
root 106 1 0 Mar 11 ? 0:00 /usr/lib/errdemon
root 108 1 0 Mar 11 ? 0:17 /etc/cron
root 10236 1 1 18:58:00 console 24:52 /mac/bin/Login -m2m -s /mac/sys/Login
root 111 1 0 Mar 11 ? 0:02 /etc/portmap
root 126 1 0 Mar 11 ? 0:03 /usr/lib/sendmail -bd -q30m
root 123 1 0 Mar 11 ? 0:02 /etc/syslogd
root 120 1 0 Mar 11 ? 0:09 /etc/named /etc/named.boot
root 116 1 0 Mar 11 ? 0:00 /etc/in.routed
root 118 1 0 Mar 11 ? 0:02 /etc/inetd
root 10384 118 0 09:21:47 p0 0:00 in.telnetd c0211407.32593
root 10385 10384 0 09:21:48 p0 0:01 -csh
root 10400 118 2 09:22:21 p1 0:01 in.telnetd c0211407.65169
root 10401 10400 1 09:22:22 p1 0:01 -csh
root 10420 10401 13 09:23:46 p1 0:00 ps -ef
delphic.root 8 # cat /etc/inittab | grep cron
cr:2:wait:/etc/cron </dev/syscon >/dev/syscon 2>&1
delphic.root 9 # ll /usr/lib/cron
total 124
prw------- 1 root sys 0 Mar 14 09:23 FIFO
-rw-r--r-- 1 root sys 3360 Mar 11 16:40 OLDlog
-rw-r--r-- 1 root sys 18 Apr 10 1990 at.allow
-rw-r--r-- 1 root sys 21 Apr 10 1990 cron.allow
-rw-r--r-- 1 root sys 57291 Mar 14 09:05 log
-rw-r--r-- 1 bin bin 0 Apr 5 1989 queuedefs
delphic.root 10 # date
Thu Mar 14 09:30:15 EST 1991
delphic.root 11 # cat /root/test
Thu Mar 14 09:29:59 EST 1991
Thu Mar 14 09:30:00 EST 1991
delphic.root 12 # tail /usr/lib/cron/log
< root 10379 c Thu Mar 14 09:04:56 1991
> CMD: date >>/root/test
> root 10381 c Thu Mar 14 09:05:00 1991
< root 10381 c Thu Mar 14 09:05:00 1991
> CMD: date >> /root/test
> root 10435 c Thu Mar 14 09:29:59 1991
< root 10435 c Thu Mar 14 09:29:59 1991
> CMD: date >> /root/test
> root 10437 c Thu Mar 14 09:30:00 1991
< root 10437 c Thu Mar 14 09:30:00 1991
delphic.root 13 # date
Thu Mar 14 09:43:12 EST 1991
delphic.root 14 # cat /root/test
Thu Mar 14 09:29:59 EST 1991
Thu Mar 14 09:30:00 EST 1991
Thu Mar 14 09:39:59 EST 1991
Thu Mar 14 09:40:00 EST 1991
delphic.root 15 # tail /usr/lib/cron/log
< root 10435 c Thu Mar 14 09:29:59 1991
> CMD: date >> /root/test
> root 10437 c Thu Mar 14 09:30:00 1991
< root 10437 c Thu Mar 14 09:30:00 1991
> CMD: date >> /root/test
> root 10450 c Thu Mar 14 09:39:58 1991
< root 10450 c Thu Mar 14 09:39:59 1991
> CMD: date >> /root/test
> root 10452 c Thu Mar 14 09:40:00 1991
< root 10452 c Thu Mar 14 09:40:00 1991
delphic.root 16 # uname -a
A/UX delphic 2.0 SVR2 mc68030
More information about the Comp.unix.admin
mailing list