Cron <[email protected]> root run-parts /etc/cron.hourly

vishal

Well-Known Member
Jan 28, 2003
340
0
166
India
Hello All,

8.5.3-STABLE_3
Redhat 7.3

I am receiving lots of Emails Everyday from the server :

-----Email---------------------------
From: "Cron Daemon" <[email protected]>
To: <[email protected]>
Sent: Friday, November 28, 2003 4:01 PM
Subject: Cron <[email protected]> root run-parts /etc/cron.hourly


> /bin/bash: root: command not found
>
>
>

Here is my crontab file :
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/scripts/.crontab installed on Fri Nov 28 03:39:02 2003)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
30 * * * * php /home/xxxxxxx/www/upload/sc/serv_cron.php > /dev/null
39 3 * * * /scripts/upcp
0 6 * * * /scripts/cleanmsglog > /dev/null 2<&1
0 6 * * * /usr/sbin/exim_tidydb /var/spool/exim callout > /dev/null 2<&1
0 6 * * * /usr/sbin/exim_tidydb /var/spool/exim retry > /dev/null 2<&1
0 6 * * * /usr/sbin/exim_tidydb /var/spool/exim reject > /dev/null 2<&1
0 6 * * * /usr/sbin/exim_tidydb /var/spool/exim wait-remote_smtp > /dev/null 2<&1
01 * * * * php /home/xxxxxxx/www/hourly_cron.php >/dev/null 2>&1
02 4 * * * php /home/xxxxxxx/www/daily_cron.php >/dev/null 2>&1
42 4 1 * * php /home/xxxxxxx/www/monthly_cron.php >/dev/null 2>&1
*/5 * * * * /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1

and here is the Logs :

Nov 28 00:00:00 server CROND[6916]: (root) CMD (/usr/lib/sa/sa1 1 1)
Nov 28 00:00:00 server CROND[6917]: (root) CMD (/usr/local/cpanel/bin/dcpumon >/dev/null 2>&1)
Nov 28 00:01:00 server CROND[6960]: (root) CMD (run-parts /etc/cron.hourly)
Nov 28 00:01:01 server CROND[6962]: (root) CMD (root run-parts /etc/cron.hourly)

WHY THERE ARE TWO ENTRIES FOR /etc/cron.hourly ONE WITH
root and one WITHOUT root.

Any Help will be appreciated.

Thanks in Advance.
 

anand

Well-Known Member
Nov 11, 2002
1,435
1
168
India
cPanel Access Level
DataCenter Provider
Originally posted by vishal
Hello All,

8.5.3-STABLE_3
Redhat 7.3

I am receiving lots of Emails Everyday from the server :

-----Email---------------------------
From: "Cron Daemon" <[email protected]>
To: <[email protected]>
Sent: Friday, November 28, 2003 4:01 PM
Subject: Cron <[email protected]> root run-parts /etc/cron.hourly


> /bin/bash: root: command not found
>
>
>

Here is my crontab file :
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/scripts/.crontab installed on Fri Nov 28 03:39:02 2003)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
30 * * * * php /home/xxxxxxx/www/upload/sc/serv_cron.php > /dev/null
39 3 * * * /scripts/upcp
0 6 * * * /scripts/cleanmsglog > /dev/null 2<&1
0 6 * * * /usr/sbin/exim_tidydb /var/spool/exim callout > /dev/null 2<&1
0 6 * * * /usr/sbin/exim_tidydb /var/spool/exim retry > /dev/null 2<&1
0 6 * * * /usr/sbin/exim_tidydb /var/spool/exim reject > /dev/null 2<&1
0 6 * * * /usr/sbin/exim_tidydb /var/spool/exim wait-remote_smtp > /dev/null 2<&1
01 * * * * php /home/xxxxxxx/www/hourly_cron.php >/dev/null 2>&1
02 4 * * * php /home/xxxxxxx/www/daily_cron.php >/dev/null 2>&1
42 4 1 * * php /home/xxxxxxx/www/monthly_cron.php >/dev/null 2>&1
*/5 * * * * /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1

and here is the Logs :

Nov 28 00:00:00 server CROND[6916]: (root) CMD (/usr/lib/sa/sa1 1 1)
Nov 28 00:00:00 server CROND[6917]: (root) CMD (/usr/local/cpanel/bin/dcpumon >/dev/null 2>&1)
Nov 28 00:01:00 server CROND[6960]: (root) CMD (run-parts /etc/cron.hourly)
Nov 28 00:01:01 server CROND[6962]: (root) CMD (root run-parts /etc/cron.hourly)

WHY THERE ARE TWO ENTRIES FOR /etc/cron.hourly ONE WITH
root and one WITHOUT root.

Any Help will be appreciated.

Thanks in Advance.
try removing these lines from the top and restart crond

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
 

vishal

Well-Known Member
Jan 28, 2003
340
0
166
India
Re: Re: Cron <[email protected]> root run-parts /etc/cron.hourly

Originally posted by anand
try removing these lines from the top and restart crond

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
Thanks for the Reply !!!
I have followed your Instructions, can u please breif on removing the Variables from the crontab file ?

I have the same crontab file on all the servers but never received such emails .

This is so Strange...........:confused:

Also your above fix will never mail ROOT for the completion of any job if needed right ?

Anyways i thank u again for the help:)
 

anand

Well-Known Member
Nov 11, 2002
1,435
1
168
India
cPanel Access Level
DataCenter Provider
Re: Re: Re: Cron <[email protected]> root run-parts /etc/cron.hourly

Originally posted by vishal
Thanks for the Reply !!!
I have followed your Instructions, can u please breif on removing the Variables from the crontab file ?

I have the same crontab file on all the servers but never received such emails .

This is so Strange...........:confused:

Also your above fix will never mail ROOT for the completion of any job if needed right ?

Anyways i thank u again for the help:)
I had the same probs on a one server of my customer, all i did was remove those lines and it was working fine.

Do the following:

crontab -e

Just remove those lines.
Save and exit.

/etc/rc.d/init.d/crond restart

Now check if you get the same error. It shouldn't do that.

The root will still get mails from cron when its required. I get mails from 15 servers every day, so don't worry.

Do let me know if this doesn;t work for you.
 

anand

Well-Known Member
Nov 11, 2002
1,435
1
168
India
cPanel Access Level
DataCenter Provider
Re: Re: Re: Cron <[email protected]> root run-parts /etc/cron.hourly

Originally posted by vishal
Thanks for the Reply !!!
I have followed your Instructions, can u please breif on removing the Variables from the crontab file ?
My guess is i unneccessarily gave all details of removing those tags from crontab when you all you wanted to know a brief of removing those variables ? ;-) sorry bro about the mixup.

I have no clues on these variables frankly, i don't use them on any of my servers, never find them useful to be used for anything. Perhaps anyone else can shed some light on this matter.

Anyways till the time it solves the probs, its k with me.