Scheduled Sync¶
Reference for Conflux's automatic sync scheduling — the sync:dispatch Artisan command and the two scheduler entries that run it across all active connections.
Command: sync:dispatch¶
Queries every SystemConnection with an active status, then dispatches one BulkSyncJob per connection that has at least one pull-in domain.
| Option | Default | Effect |
|---|---|---|
--full |
absent | Dispatches BulkSyncJob with forceFull: true; triggers reconciliation on completion |
| (absent) | — | Dispatches BulkSyncJob with forceFull: false; uses the delta cursor, skips reconciliation |
The command is driver-agnostic: it queries SystemConnection directly and works across all integration drivers (WooCommerce, PrestaShop). Which data domains a connection syncs is not read from its System alone — it is the intersection of three things, via SystemConnection::pullInCapabilities():
- the capabilities the connection's
Systemdeclares, - the connector-widget opt-in in
configuration.data_types, when the connection carries one, and - the
data_domains of activeSyncRules naming that connection as source.
A connection is skipped entirely — silently, with no error — when that intersection is empty: no linked System, an empty opt-in, or no active outgoing rule all end the same way. See Sync Rules for where those rules come from. The command always exits 0 (success) regardless of how many jobs were dispatched.
Scheduler Entries¶
Two entries in routes/console.php fire the command on a configurable cron schedule:
| Entry | Default schedule | Mode |
|---|---|---|
sync:dispatch |
Every 2 hours (0 */2 * * *) |
Delta |
sync:dispatch --full |
06:00 and 18:00 (0 6,18 * * *) |
Full |
Both schedules are controlled by the sync config file and can be overridden via environment variables.
Configuration¶
File: config/sync.php
| Key | Env variable | Default | Description |
|---|---|---|---|
sync.delta_cron |
SYNC_DELTA_CRON |
0 */2 * * * |
Cron expression for delta syncs |
sync.full_cron |
SYNC_FULL_CRON |
0 6,18 * * * |
Cron expression for full syncs |
Set these in .env to override the defaults without touching the config file:
Duplicate-Dispatch Safety¶
BulkSyncJob implements ShouldBeUnique keyed on system_connection_id. If a sync for a given connection is already queued or running when the scheduler fires again, the duplicate dispatch is a no-op. No double-processing occurs.
Sync Modes¶
- Delta sync (default, no
--fullflag) - Passes the cursor from the last completed
SyncBatchto the integration asExportRequest::$modifiedAfter. The integration returns only records modified since that point. Reconciliation is not run. See Delta Sync for the cursor derivation logic. - Full sync (
--fullflag) - Passes
modifiedAfter = null, causing the integration to return all records. On completion,ReconcileSyncJobis dispatched to soft-delete records no longer present on the source platform. See Sync Batch Reconciliation for reconciliation details.