Watch Mode
tunesync watch runs sync on a repeating schedule until you stop it with Ctrl+C.
Usage
bash
# Sync all linked pairs every 30 minutes (default)
tunesync watch
# Custom interval (minimum 1 minute)
tunesync watch --interval 15
# Watch a single linked pair in dry-run mode
tunesync watch --pair 1 --interval 10 --dry-run
# Run a fixed number of passes (useful for scheduled jobs or tests)
tunesync watch --interval 1 --max-runs 1 --dry-runNDJSON output for scripts & agents
Pass --json to emit one JSON object per pass (newline-delimited JSON), making it easy to pipe into logs or monitoring tools:
bash
tunesync watch --interval 30 --jsonEach line contains:
json
{
"run": 1,
"timestamp": "18:22:44",
"error": null,
"results": [ ... ]
}Resilience
- Survives transient errors: network timeouts or temporary HTTP 500s are logged on that pass without crashing the loop.
- Prompt Ctrl+C: sleeps in 1-second slices so interrupting on Windows, macOS, or Linux exits immediately.
- Respects all safety guards:
--dry-run, automatic backups, and bulk-deletion limits apply to every pass.