nasos75 Posted August 28, 2018 Share Posted August 28, 2018 CORE-12615 - Exclude domain sync from generic daily cron collection, honoring its own schedule setting What exactly does this mean? Since 7.6 it is clearly stated in the manual that domainsync.php will be called when necessary from main cron and there is no need for extra cron settings. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Nate Posted August 28, 2018 Share Posted August 28, 2018 WHMCS ships with a single cron.php script, this script takes various arguments and runs a series of tasks. Everytime the cron.php script (without lots of argument flags) runs, it checks the database for all known tasks and the last time each of them executed and decides which tasks to run. If the cron is executed at a specific hour set by the daily cron it includes lots of tasks that are run once a day (most of which were in the old "daily cron" script). This fix just means we honor the schedule setting for domain syncing for the domain sync tasks. i.e. if you set the domain sync to happen every 4 hours, but 2 hours since last run we realize we are doing the daily cron tasks, we don't include the domain sync tasks cause they ran less then 4 hours ago. In 7.6.0 we would execute the domain sync tasks. The domainsync.php file is an empty file and calling it does not do anything. In 7.6 we moved that code from the domainsync.php file to our new task system. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted August 28, 2018 Share Posted August 28, 2018 3 minutes ago, WHMCS Nate said: The domainsync.php file is an empty file and calling it does not do anything. In 7.6 we moved that code from the domainsync.php file to our new task system. In the 7.6 download I have here, that file is 4.9 kb in length and encoded. Has that changed *very* recently to be an empty file? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted August 28, 2018 WHMCS Support Manager Share Posted August 28, 2018 @bear, This change was made to domainsync.php in 7.6.0. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Nate Posted August 28, 2018 Share Posted August 28, 2018 The domainsync.php cron file we shipped in 7.6.1 looks like this: whmcsqa@testing.qa.whmcs.com [~/public_html/whmcs/crons]# stat domainsync.php File: `domainsync.php' Size: 5032 Blocks: 16 IO Block: 4096 regular file Device: fd00h/64768d Inode: 949353 Links: 1 Access: (0644/-rw-r--r--) Uid: (62476/ whmcsqa) Gid: (62469/ whmcsqa) Access: 2018-08-28 12:09:08.067646700 -0500 Modify: 2018-08-27 13:55:04.000000000 -0500 Change: 2018-08-28 07:32:01.955131303 -0500 whmcsqa@testing.qa.whmcs.com [~/public_html/whmcs/crons]# md5sum domainsync.php 253d9baf93317e7ec98b57b47dd9c4dd domainsync.php Ioncube encoding adds a fixed header and some other things in their encoding process, so even a simple hello world can look more complex. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted August 28, 2018 Share Posted August 28, 2018 (edited) Is there any chance you can make the cron more reliant and stable to third party code? I recently upgraded to PHP 7 and the cron was constantly failing because of third party modules with WHMCS. I don't think any third party code should be able to do this. If there is a problem with an external module (not provided by WHMCS), that module should fail, not the whole master cron. In my case, the whole WHMCS cron was failing because of the third party module inconsistency with ioncube. I don't like this one bit. Third party vendor modules should have their own separated and isolated cron tasks, and not mess up with the WHMCS master cron which is critical for billing and automation issues. This will only be an issue if more third party vendors start to tap into WHMCS cron. Edited August 28, 2018 by yggdrasil 0 Quote Link to comment Share on other sites More sharing options...
nasos75 Posted August 29, 2018 Author Share Posted August 29, 2018 Thank you Nate. 0 Quote Link to comment Share on other sites More sharing options...
nasos75 Posted August 29, 2018 Author Share Posted August 29, 2018 An since we'are talking about cron, in system health status I get a 'needing attention' item stating that 'System Cron Tasks - The system cron does not appear to have completed successfully within the last 24 hours. Check your activity logs or learn more about enabling the cron in our documentation.' But in automation settings I see a 'Cron Status Ok' and cron seems to run fine. Any suggestions? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted August 29, 2018 Share Posted August 29, 2018 3 hours ago, nasos75 said: An since we'are talking about cron, in system health status I get a 'needing attention' item stating that 'System Cron Tasks - The system cron does not appear to have completed successfully within the last 24 hours. Check your activity logs or learn more about enabling the cron in our documentation.' But in automation settings I see a 'Cron Status Ok' and cron seems to run fine. Any suggestions? Its likely the cron that runs every 5 minutes is completing, however, your daily cron is not fully completing there are a number of reasons that this could occur, i'd recommend enabling error logging under Setup > General Settings > Other > Log Errors & Display Errors then open your servers terminal window and execute your cron path php -q /path/to/cron with -F all -vvv on the end, review the output for any errors 0 Quote Link to comment Share on other sites More sharing options...
nasos75 Posted August 29, 2018 Author Share Posted August 29, 2018 Thank you Chris. You were right, it was a buggy module and I fixed it. 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.