# Automated Sync

### **Automatic Synchronization Page**

The **Automatic Synchronization** page allows you to enable **scheduled syncs** that run without manual intervention. This is ideal for keeping your Perfex CRM fully updated with WHMCS data in real time or at regular intervals.

***

#### **Enable or Disable Auto-Sync**

* **Yes** – Turns on automatic synchronization. The module will periodically fetch clients, contacts, and invoices from WHMCS.
* **No** – Turns off automatic synchronization. Manual sync will still work.

***

#### **Setting Up a Cron Job**

To enable automatic syncing, you need to add a cron job on your server using the provided URL:

```
https://yourdomain.com/whmcs_sync/clients_whmcs_sync
```

**Steps:**

1. Copy the URL provided above.
2. Log in to your hosting control panel or server terminal.
3. Create a new cron job and set the frequency (e.g., every 5 minutes, hourly, or daily).
4. Use `wget`, `curl`, or your preferred method to hit the URL. Example using `curl`:

```
curl https://yourdomain.com/whmcs_sync/clients_whmcs_sync
```

Once the cron job is active, the module will automatically pull **new clients, contacts, and invoices** from WHMCS according to your synchronization options.

> **Tip:** Ensure the cron job user has permission to execute HTTP requests and the server can reach your WHMCS API URL.
