-   Linux - General (
-   -   dual entries in cron log for cron.daily (

cpharvey 02-20-2003 08:05 AM

dual entries in cron log for cron.daily
Hi all,
Wacky problem on a RH 8.0 install, where all my cron reports seem to show up twice. In looking at the cron log I see that it seems to be running everything twice!?! By example:

Feb 16 04:21:01 mail CROND[4975]: (mailman) CMD (/usr/bin/python -S /var/mailman /cron/qrunner)
Feb 16 04:22:00 mail CROND[4979]: (root) CMD (run-parts /etc/cron.weekly)
Feb 16 04:22:00 mail CROND[4980]: (root) CMD (run-parts /etc/cron.weekly)
Feb 16 04:22:00 mail CROND[4981]: (mailman) CMD (/usr/bin/python -S /var/mailman /cron/qrunner)

As you can see at 4.22 cron.weekly ran twice. This seems to be the case for everything cron related.

I've checked for dual crontabs and root and mailman are the only ones on the system.

The usual run-parts are in the root crontab:
# run-parts
01 * * * * run-parts /etc/cron.hourly
02 4 * * * run-parts /etc/cron.daily
22 4 * * 0 run-parts /etc/cron.weekly
42 4 1 * * run-parts /etc/cron.monthly

But absolutely nothing else that would account for something running twice.

I've been looking at this one for a while now and am totally confused. Any good suggestions where to look for more evidence?


rootboy 02-20-2003 12:41 PM

Look in your /etc/init.d/rc(x).d and see how many times "cron" is listed in there.

Replace the (x) with the number of your runlevel (you can find that out in /etc/inittab). It'll probably be a 5.

If you have two instances of cron running then remove one.


cpharvey 02-20-2003 01:26 PM

Ok, that wasn't it but it gave me enough of a clue to find out what I *think* was the real problem.

I looked in /etc/init.d/crond and low and behold in there it mentioned:

# config: /etc/crontab
# pidfile: /var/run/

So I looked and there was an /etc/crontab with the defined and also mrtg

The strange thing that was also nagging at me was mrtg kept running on my system but it wasn't in the root crontab shown by crontab -l or crontab -e, but it was another (I though unrelated) problem I had to track down.

Anyway, I put everything I needed into a file, ran crontab -r then crontab /var/spool/cron/root and checked this with a crontab -l

I've also changed the config line in crond for good measure, but I'm sure that isn't going to do much.

So, tomorrow we'll see if that fixed it! :cool:

rootboy 02-27-2003 03:30 PM

Cool ! Good luck :)


All times are GMT -5. The time now is 03:28 AM.