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

CrazySerb

Member
Apr 1, 2015
11
3
3
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.
 

sysnishit

Active Member
Aug 13, 2018
25
3
3
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,917
2,248
363
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.