Container Run Once Mode
Run a local sync that waits for completion and returns an exit code.
cw sync once runs a sync in the current process. It waits for completion, then exits with a result code.
Use it for external automation, including cron, one-shot Docker containers, Kubernetes CronJobs, and CI checks.
cw sync run sends work to the running CrossWatch service. cw sync once does not. It runs the sync locally.
Start a sync
Run all enabled sync pairs:
cw sync onceRun one pair by its number, ID, unique ID prefix, or label:
cw sync once 1cw sync once pair_07c3Run several pairs:
cw sync once --pair pair_07c3 --pair pair_91abRun only specific features:
cw sync once --feature watchlistcw sync once --feature watchlist --feature ratingsAvailable feature names:
watchlist
ratings
history
progress
playlists
collectionPreview changes
Add --dry-run to inspect the sync without changing any provider data:
Use in automation
Add --json to print the final summary as JSON. This works well with scripts and monitoring tools.
Combine it with pair selection when needed:
Exit status
The command returns one of these codes:
Unresolved and skipped items do not fail the command by default. Enable strict checks when automation must treat them as failures.
Fail when CrossWatch cannot resolve an item:
Fail when CrossWatch skips an item:
Combine both checks:
Preserve the last-sync marker
The command updates the last-sync state marker when configured. This marker helps CrossWatch track completed syncs.
Add --no-state-json to leave the marker unchanged:
Run a one-shot Docker container
Mount the same configuration volume used by CrossWatch. The container runs one sync, then --rm removes it.
Select specific pairs:
Use strict mode with JSON output for cron or Kubernetes:
Choose the right command
Use cw sync once when an external scheduler needs the completed sync result.
Use cw sync run when the running CrossWatch service should start a background sync.
Last updated
Was this helpful?