LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 02-20-2003, 08:05 AM   #1
cpharvey
LQ Newbie
 
Registered: Feb 2003
Location: Arlington, VA
Distribution: Redhat
Posts: 4

Rep: Reputation: 0
Unhappy 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?

Chris
 
Old 02-20-2003, 12:41 PM   #2
rootboy
Member
 
Registered: Oct 2001
Distribution: Mint 15
Posts: 770

Rep: Reputation: 51
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.


John
 
Old 02-20-2003, 01:26 PM   #3
cpharvey
LQ Newbie
 
Registered: Feb 2003
Location: Arlington, VA
Distribution: Redhat
Posts: 4

Original Poster
Rep: Reputation: 0
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/crond.pid

So I looked and there was an /etc/crontab with the run.parts 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!
 
Old 02-27-2003, 03:30 PM   #4
rootboy
Member
 
Registered: Oct 2001
Distribution: Mint 15
Posts: 770

Rep: Reputation: 51
Cool ! Good luck


John
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron Job Daily petenyce Linux - Newbie 17 01-04-2006 12:13 PM
cron.daily question ralvy Slackware 6 12-09-2004 11:55 PM
crontab vs cron.daily ? SheldonPlankton Linux - Newbie 1 07-16-2004 01:10 PM
cron.daily error gjmwalsh Mandriva 2 10-29-2003 03:12 PM
cron.daily MrJoshua Linux - General 2 03-19-2003 01:09 PM


All times are GMT -5. The time now is 12:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration