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!

SOLVED Cron jobs stopped working after cPanel to cPanel transfer to a new server

Discussion in 'General Discussion' started by CrazySerb, Aug 14, 2018.

Tags:
  1. CrazySerb

    CrazySerb Member

    Joined:
    Apr 1, 2015
    Messages:
    10
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Canada
    cPanel Access Level:
    Root Administrator
    Ok, these cron jobs used to work just fine on the previous server, and we kept the same OS and pretty much everything moving WHM/cPanel accounts over to the new server, but now, after all the troubleshooting and little tweaks, we can't figure out what's causing these cron jobs not to fire and take effect...

    Here is an example:

    /usr/bin/curl -s http://domain.com/members/cron

    or even

    /usr/bin/curl http://domain.com/members/cron

    or

    curl http://domain.com/members/cron

    and we see them fire off in /var/log/cron, but they don't actually, umm, execute, if that makes sense, because we keep seeing the "it's been more than 24 hours since the cron has run, etc) error message in their app. And we set this cron job to run every minute, for testing, yet nothing.

    However, if I log into SSH as root (as I disabled shell access for regular users) and run any of those cron jobs manually in command line, they will execute properly and the error message in the users' app will disappear, meaning the cron properly applied whatever it needed to apply.

    So I am thinking there are some permissions issues somewhere with cron, root, something, I dunno... I've given up looking after 2 days, as I've got nothing else.

    Any suggestions?

    Thanks.
     
  2. sysnishit

    sysnishit Active Member

    Joined:
    Aug 13, 2018
    Messages:
    25
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Internet
    cPanel Access Level:
    Root Administrator
    Hello,

    Check permission and ownership of cron job files as well as that of curl binary. Check if curl is allowed to be executed as respective cpanel users sometimes, user needed to be added to group in order to allow execution of commands like curl wget.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    46,992
    Likes Received:
    2,122
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @CrazySerb,

    Can you let us know the permissions configured for /usr/bin/curl file on your system? You can check with a command like this:

    Code:
    stat /usr/bin/curl
    The default permissions are 0755. Also, can you let us know which operating system you are using on this server?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. CrazySerb

    CrazySerb Member

    Joined:
    Apr 1, 2015
    Messages:
    10
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Canada
    cPanel Access Level:
    Root Administrator
    That's exactly what it was... somehow on CloudLinux out of the box permissions were set to 0700 on that file. Ugh... thanks!
     
    cPanelMichael likes this.
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