Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

cron job not working

Discussion in 'General Discussion' started by mywish1, Jan 23, 2017.

Tags:
  1. mywish1

    mywish1 Active Member

    Joined:
    Sep 13, 2014
    Messages:
    28
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    hi
    i have set some cron jobs but its not working i i have set path like in cpanel
    /home/user/public_html/domain.com/fetch/mov.php > /dev/null 2>&1
    but its not adding anything in database i set some php path on there to get something and add them in database but still its not working commands not working i dont know why

    may be cron job is disable or what is issue i have no idea
    i m running centos 7 with cpanel whm latest version waiting thanks.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    This is not a valid command. You'd need to use something such as:

    Code:
    php /home/user/public_html/domain.com/fetch/mov.php > /dev/null 2>&1
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    ItsMattSon likes this.
  3. mywish1

    mywish1 Active Member

    Joined:
    Sep 13, 2014
    Messages:
    28
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    is that this is not valid path
    /usr/bin/php -q /home/user/public_html/domain.com/fetch/mov.php > /dev/null 2>&1
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. ItsMattSon

    ItsMattSon Well-Known Member

    Joined:
    Sep 5, 2016
    Messages:
    167
    Likes Received:
    34
    Trophy Points:
    103
    Location:
    Perth
    cPanel Access Level:
    Root Administrator
    In addition to Michael's advice, i've found that my Magento crons don't run unless I use /usr/bin/php-cli instead of /usr/bin/php but that's probably circumstantial :)

    EDIT: Disregard the above! Not sure if something changed between 58 and 62 but /usr/bin/php-cli symlink doesn't appear to exist anymore so I updated my Magento crons to /usr/local/bin/php (which use the php-cli binary as per Michael's documentation link)
     
    #5 ItsMattSon, Feb 13, 2017
    Last edited: Feb 13, 2017
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice