Jessie Abernathy Posted December 4, 2018 Share Posted December 4, 2018 Can someone please explain to me why I'm getting this weird cron email message? (see attached screenshot) It says that my cron is not executing when it is supposed to (which is set to 9:am) this System cron in WHMCS is set to run every 5 minutes, and then there are 2 cron jobs that run the same cron.php in my cPanel (one of them runs every 5 minutes, and one is set to run at hour 9) so I'm not sure what i'm doing wrong... I need help :) :) 0 Quote Link to comment Share on other sites More sharing options...
bear Posted December 4, 2018 Share Posted December 4, 2018 Why have you created two cronjobs? It should be one that's set for every 5 minutes (or so), and in the settings in WHMCS you tell it when you want the main one to fire (in your case, 9 AM). It uses just one cron in cPanel for all of it. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Josh Posted December 4, 2018 Share Posted December 4, 2018 It looks like your cron job is starting but not fully completing, which would trigger this notification email to be sent. Your cron is most likely failing to complete due to a fatal PHP error. Do you see any errors if you enable Display Errors on the Setup > General Settings > Other tab and manually execute your cron job from the shell using the all --force -vvv options? php -q /crons/cron.php all --force -vvv https://docs.whmcs.com/Cron_Job_Issues#Run_the_cron_job_from_the_server_command_line_with_debugging_enabled 0 Quote Link to comment Share on other sites More sharing options...
Jessie Abernathy Posted December 4, 2018 Author Share Posted December 4, 2018 No i don't see any errors when i manually execute the cron job from the shell (see attached screenshot) Here is a screenshot of my automation settings inside WHMCS (see attached screenshot) Here is a screenshot of my settings in my cPanel (see attached screenshot) 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Josh Posted December 4, 2018 Share Posted December 4, 2018 Thanks for providing the screenshots and additional information. I'm seeing that you have not set the System Cron to run every 5 minutes as per the documentation here: https://docs.whmcs.com/Crons#System_Cron The System Cron (cron.php file) needs to be executed by your server's crontab every 5 minutes. What will happen is when the cron file gets executed during your Time of Day hour, it will then perform all automation tasks and mark as completed in WHMCS. When the cron is able to complete all tasks and mark itself as completed, you will no longer receive that email notification saying that it didn't run during the expected time. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted December 4, 2018 Share Posted December 4, 2018 3 hours ago, Jessie Abernathy said: there are 2 cron jobs that run the same cron.php in my cPanel (one of them runs every 5 minutes, and one is set to run at hour 9) Ah, those are not the same cron file being run. One is for importing email, the other is the system cron. 0 Quote Link to comment Share on other sites More sharing options...
Jessie Abernathy Posted December 4, 2018 Author Share Posted December 4, 2018 Sorry I'm a little confused.. so how do I fix it? and where? WHMCS? or in my cPanel? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted December 4, 2018 Share Posted December 4, 2018 cPanel. Look for cron jobs, and edit the "cron.php" one to be every 5 minutes also, just like the "pop.php" one. 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.