Domain Sync Task

The domain sync task is responsible for ensuring that the next due date, expiry date, and status are up-to-date on all Pending Transfer, Pending Registration, and Active status domains that use a valid registrar module. This task runs as part of the system cron’s automation tasks.

For more information, see System Cron.

The Domain Sync Task

The domain sync task uses each domain registrar module’s domain synchronization functions (if they exist) to check 50 domains per run from the oldest to newest in your WHMCS installation. The task handles Pending Transfer, Pending Registration, and Active status domains separately, so it can do 50 of each during each run.

Task Actions

The task performs the following actions depending on the domain status:

Domain StatusActions
Active
  • The task will update the expiry date to match the date that the domain registrar returns for it, if the dates differ.
  • If the dates already match, the task returns an In Sync message.
  • If you have enabled Sync Next Due Date at Configuration () > System Settings > Automation Settings, it will adjust the Next Due Date value.
Pending Registration
  • The task will update the expiry date to match the date that the domain registrar returns for it, if the dates differ.
  • The task will also set the domain status to Active if registration is now complete.
  • If the dates already match, the task returns an In Sync message.
Pending Transfer
  • The task will report an error if the transfer process is not complete.
  • If the transfer process is complete, the task will:
    1. Set the domain status to Active.
    2. Send the Domain Transfer Completed email template with the expiry date from the registrar.
  • If the domain uses the eNom module and the transfer fails, the task will send the Domain Transfer Failed email template.

For example, if you are using eNom and have 150 Active and Pending Registration domains and 20 domains in the Pending Transfer status, the script will check the 20 Pending Transfer status domains during each run, along with 50 of the Active and Pending Registration status domains, starting over once it reaches the newest domain.

  • After the domain sync is complete, the system sends an email to admins who have the System Emails administrator role.
  • If you have enabled Domain Sync Notify Only at Configuration () > System Settings > Automation Settings, the system will not perform any of the above actions. Instead, it will only send the email, which will list the changes that the sync task would have made.

Common Errors

You may see the following common errors when this task runs:

ErrorDescriptionRecommended Solution
Sync not supported by moduleThis error indicates that the registrar module for this domain does not support the domain sync feature. Because of this, the system will not make any changes to this domain or its status. Typically, this error occurs when using third-party or custom domain modules.Contact your module’s developer to fix this issue.
Curl error - could not connect to hostThis error indicates that you have not correctly whitelisted your server’s IP address for API access with your domain registrar.Check your domain registrar module’s documentation for steps or contact the registrar and provide the IP address that appears at Help () > License Information.

Last modified: June 14, 2024