Jump to content

CORE-12615 in 7.6.1 (domainsync)


Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by yggdrasil
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated