salah uddin Posted July 4, 2020 Share Posted July 4, 2020 we am working for whmcs and trying to fix cron status. server is in house hosted. Current version: 7.7.0 we checked the Automation Settings and found " Cron Status Error " and last run long ago. but if we run the below (displaying crontab command)is on manually from terminal we found everything working ok. /opt/cpanel/ea-php72/root/usr/bin/php -q /home/leotechltd/public_html/crons/cron.php checked the crontab on cpanel and configuration was as expected given below. php -q /home/leotechltd/public_html/crons/cron.php if anyone know how to resolve the issue please share your knowledge. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted July 11, 2020 Share Posted July 11, 2020 If the cron you run from the terminal command line works fine, you should use the exact command for your cPanel crontab configuration. Forget what cPanel is suggesting you to use, its not correct for your PHP version. Running just php -q uses the PHP installed on the server. Your PHP is on /opt/cpanel/ea-php72/root/usr/bin That means your cronjobs on cPanel should look like that. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst WHMCS Anwar Posted July 11, 2020 WHMCS Technical Analyst Share Posted July 11, 2020 The best way to see what is happening with your cron, would be to append it with -vvv > /home/leotechltd/public_html/crons/cronlog.txt so it looks something like: /opt/cpanel/ea-php72/root/usr/bin/php -q /home/leotechltd/public_html/crons/cron.php -vvv > /home/leotechltd/public_html/crons/cronlog.txt Enable displaying of PHP errors in WHMCS, via Setup > General Settings > Other and check the display errors option. Then when cron runs, the output of your /home/leotechltd/public_html/crons/cronlog.txt file would contain a more detailed error message allowing you to pin-point exactly what the issue is. There is further information along with step-by-step instructions in our online documentation at https://help.whmcs.com/m/automation/l/683269-advanced-cron-troubleshooting Let me know how it goes 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.