The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cron <root@server> root run-parts /etc/cron.hourly

Discussion in 'General Discussion' started by vishal, Nov 28, 2003.

  1. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    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" <root@server.xxxxxxx.com>
    To: <root@server.xxxxxxx.com>
    Sent: Friday, November 28, 2003 4:01 PM
    Subject: Cron <root@server> 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.
     
  2. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    try removing these lines from the top and restart crond

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

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Re: Re: Cron <root@server> root run-parts /etc/cron.hourly

    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:)
     
  4. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Re: Re: Re: Cron <root@server> root run-parts /etc/cron.hourly

    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.
     
  5. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    did it work for you ??
     
  6. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Re: Re: Re: Cron <root@server> root run-parts /etc/cron.hourly

    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.
     
Loading...

Share This Page