diff --git a/platform/shell-sync/sync.sh b/platform/shell-sync/sync.sh index 4731fe80..0f303a37 100644 --- a/platform/shell-sync/sync.sh +++ b/platform/shell-sync/sync.sh @@ -373,3 +373,15 @@ run_daemon() { start_heartbeat trap 'kill "${HEARTBEAT_PID:-}" "${CRON_PID:-}" 2>/dev/null || true' EXIT + if [ -n "$SYNC_CRON" ]; then + run_cron_scheduler + return + fi + + while true; do + sync_all || true + log "Sleeping ${SYNC_INTERVAL}s before the next sync cycle" + sleep "$SYNC_INTERVAL" + done +} +