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.

User's crons are broken

Discussion in 'General Discussion' started by junglecat, Nov 19, 2006.

  1. junglecat

    junglecat Well-Known Member

    Joined:
    Jul 6, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    WHM 10.8.0 cPanel 10.9.0-R57
    CentOS 3.8 i686 - WHM X v3.1.0

    I have support tickets today from users who's crons have stopped running the scripts in their accounts. I went into one of the user's cpanels and changed the email address where the cron output will be sent to my own email address so that I can see if there are any errors in the cron mails, but I'm not receiving any cron emails. I should be receiving them every 10 minutes from that one user account.

    How can I troubleshoot this? :confused:
     
  2. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Restart cron daemon:
    /sbin/service crond restart
    If that doesn't help, check the cron log file for any errors:
    /var/log/cron
     
  3. junglecat

    junglecat Well-Known Member

    Joined:
    Jul 6, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Just did that, got this:

    /sbin/service crond restart
    Stopping crond: cannot stop crond: crond is not running. [FAILED]
    Starting crond: [ OK ]


    Which indicates crons weren't running and have restarted, so that may have fixed it. I will know in a few minutes.

    Thanks! (I'll come back and update the topic if they still aren't running).
     
  4. junglecat

    junglecat Well-Known Member

    Joined:
    Jul 6, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    I'm still having a problem. I restart crons, they run for a few hours, or a day or so, and then fail again.

    I tried this:
    /var/log/cron

    and got:
    bash: /var/log/cron: Permission denied

    Any suggestions?
     
  5. sjackson909

    sjackson909 Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Columbus, OH
    Make sure it's running

    ps -ax | grep cron

    You will see crond if it's running. Also /var/log/cron is a log file. You will need to open it or tail it.

    tail /var/log/cron

    What dist are you using?
     
  6. junglecat

    junglecat Well-Known Member

    Joined:
    Jul 6, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    I should have mentioned that I generally need idiot instructions :p

    Here is the output:

    root@server6 [/home/cathy]# ps -ax | grep cron
    4756 ? S 0:00 crond
    7380 pts/0 S 0:00 grep cron
    root@server6 [/home/cathy]# tail /var/log/cron
    Nov 22 10:50:02 server6 crond[5688]: (paidcash) CMD (/usr/bin/php /home/paidcash
    /public_html/scripts/admin/cronjobs.php > /dev/null)
    Nov 22 10:50:02 server6 crond[5689]: (buzz411) CMD (lynx --dump http://411buzz.c
    om/pages/ptp_proxy_guard_live.php > /dev/null)
    Nov 22 10:50:02 server6 crond[5683]: (buzz411) CMD (lynx --dump http://411buzz.c
    om/scripts/admin/jkcron.php > /dev/null)
    Nov 22 10:50:02 server6 crond[5665]: (skyesear) CMD (/usr/bin/php /home/skyesear
    /public_html/cron.php)
    Nov 22 10:51:01 server6 crond[6198]: (skyesear) CMD (/usr/bin/php /home/skyesear
    /public_html/cron.php)
    Nov 22 10:51:01 server6 crond[6199]: (paidcash) CMD (/usr/bin/php /home/paidcash
    /public_html/scripts/admin/cronjobs.php > /dev/null)
    Nov 22 10:52:02 server6 crond[6701]: (skyesear) CMD (/usr/bin/php /home/skyesear
    /public_html/cron.php)
    Nov 22 10:52:02 server6 crond[6702]: (paidcash) CMD (/usr/bin/php /home/paidcash
    /public_html/scripts/admin/cronjobs.php > /dev/null)
    Nov 22 10:53:01 server6 crond[7223]: (skyesear) CMD (/usr/bin/php /home/skyesear
    /public_html/cron.php)
    Nov 22 10:53:01 server6 crond[7225]: (paidcash) CMD (/usr/bin/php /home/paidcash
    /public_html/scripts/admin/cronjobs.php > /dev/null)


    Then I did grep again and got this :confused:

    root@server6 [/home/cathy]# root@server6 [/home/cathy]# ps -ax | grep cron
    bash: root@server6: command not found
    root@server6 [/home/cathy]# 4756 ? S 0:00 crond
    bash: 4756: command not found
    root@server6 [/home/cathy]# 7380 pts/0 S 0:00 grep cron
    bash: 7380: command not found
    root@server6 [/home/cathy]# root@server6 [/home/cathy]# tail /var/log/cron
    bash: root@server6: command not found
    root@server6 [/home/cathy]# Nov 22 10:50:02 server6 crond[5688]: (paidcash) CMD (/usr/bin/php /home/paidcash
    bash: syntax error near unexpected token `('
    root@server6 [/home/cathy]# /public_html/scripts/admin/cronjobs.php > /dev/null)
    bash: syntax error near unexpected token `)'
    root@server6 [/home/cathy]# Nov 22 10:50:02 server6 crond[5689]: (buzz411) CMD (lynx --dump http://411buzz.c
    bash: syntax error near unexpected token `('
    root@server6 [/home/cathy]# om/pages/ptp_proxy_guard_live.php > /dev/null)
    bash: syntax error near unexpected token `)'
    root@server6 [/home/cathy]# Nov 22 10:50:02 server6 crond[5683]: (buzz411) CMD (lynx --dump http://411buzz.c
    bash: syntax error near unexpected token `('
    root@server6 [/home/cathy]# om/scripts/admin/jkcron.php > /dev/null)
    bash: syntax error near unexpected token `)'
    root@server6 [/home/cathy]# Nov 22 10:50:02 server6 crond[5665]: (skyesear) CMD (/usr/bin/php /home/skyesear
    bash: syntax error near unexpected token `('
    root@server6 [/home/cathy]# /public_html/cron.php)
    bash: syntax error near unexpected token `)'
    root@server6 [/home/cathy]# Nov 22 10:51:01 server6 crond[6198]: (skyesear) CMD (/usr/bin/php /home/skyesear
    bash: syntax error near unexpected token `('
    root@server6 [/home/cathy]# /public_html/cron.php)
    bash: syntax error near unexpected token `)'
    root@server6 [/home/cathy]# Nov 22 10:51:01 server6 crond[6199]: (paidcash) CMD (/usr/bin/php /home/paidcash
    bash: syntax error near unexpected token `('
    root@server6 [/home/cathy]# /public_html/scripts/admin/cronjobs.php > /dev/null)
    bash: syntax error near unexpected token `)'
    root@server6 [/home/cathy]# Nov 22 10:52:02 server6 crond[6701]: (skyesear) CMD (/usr/bin/php /home/skyesear
    bash: syntax error near unexpected token `('
    root@server6 [/home/cathy]# /public_html/cron.php)
    bash: syntax error near unexpected token `)'
    root@server6 [/home/cathy]# Nov 22 10:52:02 server6 crond[6702]: (paidcash) CMD (/usr/bin/php /home/paidcash
    bash: syntax error near unexpected token `('
    root@server6 [/home/cathy]# /public_html/scripts/admin/cronjobs.php > /dev/null)
    bash: syntax error near unexpected token `)'
    root@server6 [/home/cathy]# Nov 22 10:53:01 server6 crond[7223]: (skyesear) CMD (/usr/bin/php /home/skyesear
    bash: syntax error near unexpected token `('
    root@server6 [/home/cathy]# /public_html/cron.php)
    bash: syntax error near unexpected token `)'
    root@server6 [/home/cathy]# Nov 22 10:53:01 server6 crond[7225]: (paidcash) CMD (/usr/bin/php /home/paidcash
    bash: syntax error near unexpected token `('
    root@server6 [/home/cathy]# /public_html/scripts/admin/cronjobs.php > /dev/null)
    bash: syntax error near unexpected token `)'
     
  7. sjackson909

    sjackson909 Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Columbus, OH
    Ok. Good crond is running. Which user is having problems? Do you see them in the tail /var/log/cron? Also how do you know they are having problems and what is the problem they are having?
     
  8. TimTim

    TimTim Registered

    Joined:
    Jan 14, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Try modify the crontab to to be "/usr/bin/php -f /home/paidcash
    /public_html/scripts/admin/cronjobs.php" (minus quotes of course)
     
  9. junglecat

    junglecat Well-Known Member

    Joined:
    Jul 6, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Several users are complaining. They are running the Cash Crusader affiliate script. I'm a reseller for that script and I know it inside and out. It uses crons. When the crons stop, the script stops updating user info and also when you login to admin while crons aren't running you get a warning that crons aren't running.

    But that's not the only script using crons. A user on that server is running a search script which also uses crons, and her script stops working, too.

    The problem is, the crons run for a few hours to a day or so, and then stop. I have to restart it. When I restart it, I get this:

    Stopping crond: cannot stop crond: crond is not running. [FAILED]
    Starting crond: [ OK ]

    So obviously, it is indeed failing since I get the error that it's not running.

    When I restart it, the sites start working again for a few hours until crons fail again.
     
Loading...

Share This Page