borzoid Posted July 19, 2019 Share Posted July 19, 2019 Hi, These are probably stupid questions but here goes. I'm trying to configure my cron job(s) and am looking at the docs and different tutorials online. -Some of the tuts say set the cron to run once daily. Others say every 5 minutes. -most of the different community posts I see reference 3 cron jobs but I can only find instructions for one. How many crons am I supposed to have and what are they? -I'm confused about the cron path. I am using cpanel. the automation settings page shows this: /usr/bin/php -q /home/inpedigr/whmcsdata/crons/cron.php however all of the tuts I've looked at only show this for the command php -q /home/inpedigr/whmcsdata/crons/cron.php . Which is it? I appreciate any help I can get. Thank you. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 19, 2019 Share Posted July 19, 2019 14 minutes ago, borzoid said: Some of the tuts say set the cron to run once daily. Others say every 5 minutes. it depends on your WHMCS version.... older versions only needed to run once per day; recent versions need the cron to run at least hourly, and usually as often as your server can handle. 15 minutes ago, borzoid said: most of the different community posts I see reference 3 cron jobs but I can only find instructions for one. How many crons am I supposed to have and what are they? these days there is usually just one - previously, you needed a separate cron for domain synchronisation (optional).... you might still need another cron if you use POP3 mail importing - but if not, and unless you're using a third-party solution for domain syncing, you should only need the one. 21 minutes ago, borzoid said: I'm confused about the cron path. I am using cpanel. the automation settings page shows this: /usr/bin/php -q /home/inpedigr/whmcsdata/crons/cron.php however all of the tuts I've looked at only show this for the command php -q /home/inpedigr/whmcsdata/crons/cron.php . Which is it? they're the same, it's just a case of knowing the correct path to PHP on your server... your host should be able to tell you which is right for your server setup. 0 Quote Link to comment Share on other sites More sharing options...
borzoid Posted July 19, 2019 Author Share Posted July 19, 2019 Thank you for the fast response. Using "/usr/bin/php -q /home/inpedigr/whmcsdata/crons/cron.php" is still triggering an error so will change that. The other settings are for every 5 minutes. Should I change the run time to try to get this to trigger again? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 19, 2019 Share Posted July 19, 2019 9 minutes ago, borzoid said: Using "/usr/bin/php -q /home/inpedigr/whmcsdata/crons/cron.php" is still triggering an error so will change that. https://docs.whmcs.com/Cron_Configuration 7 minutes ago, borzoid said: Should I change the run time to try to get this to trigger again? i'd leave it - most of the tasks in the cron only run once a day anyway (except domain syncing and ticket escalating) - so if you're not using either option, just keep checking the System Health page to see if the cron is running correctly. also, be aware that you can move the Crons directory so that it's not publicly accessible - if you do this, remember to update your cron path too. https://docs.whmcs.com/Custom_Crons_Directory 0 Quote Link to comment Share on other sites More sharing options...
borzoid Posted July 19, 2019 Author Share Posted July 19, 2019 OK so every 5 minutes I am getting an email that says: Your WHMCS is configured to perform the Daily System Cron during the hour of 4 am. However, the Daily System Cron did not execute within that hour as expected Will I continue to get these until 4am? or is something wrong? And if I am still getting these after 4am. Then what do I do? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 19, 2019 Share Posted July 19, 2019 4 minutes ago, borzoid said: OK so every 5 minutes I am getting an email that says: work your way through the steps in the page below... https://help.whmcs.com/m/automation/l/678266-resolve-daily-cron-not-executing-within-the-expected-hour 0 Quote Link to comment Share on other sites More sharing options...
borzoid Posted July 19, 2019 Author Share Posted July 19, 2019 I have done this several times. I don't know what I'm doing wrong. attached are screen shots of my whmcs automation settings and my cpanel Cron jobs 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 19, 2019 Share Posted July 19, 2019 21 minutes ago, borzoid said: I have done this several times. I don't know what I'm doing wrong. attached are screen shots of my whmcs automation settings and my cpanel Cron jobs have you checked with your host that the path to php is correct ? what WHMCS tells me to use in Automation Settings, is not the same as what I actually use - so your host will know best as to the correct path for crons. 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.