jacksony Posted May 18, 2020 Share Posted May 18, 2020 Hi, We have a strange problem. Our setting in WHMCS is to run cron at 00:00 hours. Our server is on +8 GMT. I'm realising the Cron Report/Summary is sent out at 08:00 +GMT instead of 00:00 +8 GMT. Is this a bug? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 18, 2020 Share Posted May 18, 2020 2 hours ago, jacksony said: Is this a bug? it's a common occurrence where the server time doesn't match WHMCS. the way i've always tweaked it is to add a line to the configuration.php file... the official way is to edit the php.ini file - https://docs.whmcs.com/Changing_Timezone either way, one of them should fix the issue. 0 Quote Link to comment Share on other sites More sharing options...
jacksony Posted May 18, 2020 Author Share Posted May 18, 2020 Thanks for answering the same question many times. Is there a way to check if it works? Instead of waiting for the 1200am for the whmcs cron to run? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst II WHMCS Alex Posted May 19, 2020 WHMCS Technical Analyst II Share Posted May 19, 2020 Hello @jacksony You can check this by navigating to Setup > Automation settings and looking at the "Last Run" time value in the green box , then compare it with the time in the right corner of the admin UI. They should match or be within 5 minutes of each other (assuming your cron is executed every 5 minutes). We have some cron specific documentation at the bottom of this page that may also help: https://docs.whmcs.com/Changing_Timezone My personal recommendation would be to specify a date.timezone value in the cron command itself. The reason for this is then you can be absolutely sure it's executing under the correct timezone, and it saves having to investigate any difference between the timezone your php-cli is using vs what is set for this in the PHP configuration applied to web pages like WHMCS. Below is an example of running the cron.php script under the Europe/London timezone: php -d "date.timezone=Europe/London" -q /path/to/crons/cron.php I hope this helps. 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.