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 Cron doesn't seem to be working

Discussion in 'General Discussion' started by usdcservers, Jan 25, 2017.

Tags:
  1. usdcservers

    usdcservers Member

    Joined:
    Jul 6, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    51
    For months now I have been trying to figure out why the user cron is not working, I am running CENTOS 7.3 x86_64 standard –WHM 60.0 (build 35) with PHP 5.5.38.

    The user cron that was working fine up until Oct 2016 is:

    */2 * * * * php -q /home/user/public_html/hosting/cron/cronjob.php

    In the email that is sent I get the following message:

    This script is not intended to be invoked from a browser.

    I can run the command in SSH as root or the user and it works just fine, I also use the following command in both to see what is happening and again it works just fine:

    php -q /home/user/public_html/hosting/cron/cronjob.php --debug --verbose --force

    I have also tried using /usr/local/bin/php -q /home/user/public_html/hosting/cron/cronjob.php and still the cron is not working. There are no error messages in /var/log/cron

    Jan 25 07:02:01 server CROND[25143]: (user) CMD (php -q /home/user/public_html/hosting/cron/cronjob.php)

    The directory permissions are 755 and the file permissions are 644

    Scott
     
    #1 usdcservers, Jan 25, 2017
    Last edited by a moderator: Jan 25, 2017
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,171
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you try using '/usr/local/bin/php' again and let us know if the issue persists? This is discussed at:

    SOLVED - EasyApache 4 Cron Issue

    Thank you.
     
  3. usdcservers

    usdcservers Member

    Joined:
    Jul 6, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    51
    When I use /usr/local/bin/php I cannot tell if crons are working as of yet and the emails also stop so I do not know if it is producing the same message "This script is not intended to be invoked from a browser.".

    I will also take a look at that thread.

    Scott
     
Loading...

Share This Page