Isaac Asher Posted July 18, 2018 Share Posted July 18, 2018 In my System Health Status screen, there is one red item needing attention System Cron Tasks. It says it does not appear to have completed successfully within the last 24 hours. When I go to Setup --> Automation Settings, I have the green box at the top of the page that says Cron Status Ok, and that it last ran at 3:47am this morning. How can I make the warning go away if the cron is actually running successfully? Can someone shed some light on this? Thanks much!! 0 Quote Link to comment Share on other sites More sharing options...
Vox Posted July 19, 2018 Share Posted July 19, 2018 Hi Isaac, This may help: http://help.whmcs.com/m/automation/l/678266-resolve-daily-cron-not-executing-within-the-expected-hour Also there is the full cron guide here: http://help.whmcs.com/m/automation 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst II WHMCS Alex Posted July 20, 2018 WHMCS Technical Analyst II Share Posted July 20, 2018 Hello Isaac, I can confirm this isn't a false warning. The box you find at `Setup -> Automation Settings` will only indicate the last time the cron ran, even if no tasks were performed. The issue highlighted at `Help -> System Health Status` means that whilst the cron is running, it was unable to complete all it's daily automation tasks, which it will attempt to do at the time specified on the Automation Settings page. The first part of troubleshooting this would be to ensure the cron is running, which you have confirmed, so, the next step is check it's running every 5 minutes, or at least once in the hour your cron attempts to perform it's daily automation tasks, which again you can check the time it does this on the Automation Settings page. If the cron is running during this hour, it means it's starting but unable to complete all the tasks, so you will want to manually force the cron to run from the command line interface on your server using the `--force` and `-vvv` options. The force option will force the execution of tasks, regardless of "due" or "in progress" state and the vvv option will provide a verbose output on screen. Given that we expect an error here, before doing this, please navigate to `Setup -> General Settings -> Other` and tick `Display Errors`. The command you are looking to execute in the CLI will be this: php -q /path/to/crons/cron.php --force -vvv You just need to replace /path/to/crons with the actual path to your crons directory. Please don't hesitate to post the output back into this thread and I will advise further. We also have a collection of common errors on this page: https://docs.whmcs.com/Cron_Job_Issues 0 Quote Link to comment Share on other sites More sharing options...
Isaac Asher Posted July 20, 2018 Author Share Posted July 20, 2018 Thank you so much, Alex! I appreciate your detailed response, however I am somewhat limited. I do not have access to the command line on the server as it is shared hosting. I don't believe there is a way to run commands through cPanel, so I dug into WHMCS documentation more (thanks for the link). Without command prompt access, I went to Setup --> General Settings --> Other tab and ticked the Display Errors option. Successfully saved settings, and then navigated the browser to /whmcs/crons/cron.php but it just gave me a blank white window. No output at all. Hope that's helpful. Thank you so much! 0 Quote Link to comment Share on other sites More sharing options...
Isaac Asher Posted July 23, 2018 Author Share Posted July 23, 2018 I reviewed my cron settings in cPanel once again and found that it was not set to run every five minutes. Once I updated that, then I began receiving the automated emails from WHMCS telling me everything completed successfully. Warning in WHMCS about the cron job is now resolved. Thanks everyone for your help!!!! 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.