By default, you can enable the sync to take place automatically when the WHMCS daily cron job runs. We also provide a custom cron.php file which allows the sync to take place outside of the WHMCS daily cron. Please note, we do not recommend running the sync more than a few times a day to avoid hiding Xero API limits:
php -q /home/username/public_html/whmcs/modules/addons/xero/cron.php
By default, the script will run all sync options you have enabled in the module. Alternatively, you can force a specific sync by appending one of these options:
- sync-xero-payments
- sync-contacts
- sync-invoices
- sync-payments
- sync-all (to force all sync methods to run regardless of whether they are enabled in the module or not)
For example, to sync only Xero Payments to WHMCS:
php -q /home/username/public_html/whmcs/modules/addons/xero/cron.php sync-xero-payments