From ebb7df6585ec5ed3a9407607a1db3b7a6c541f29 Mon Sep 17 00:00:00 2001 From: hoelee Date: Wed, 15 Jul 2026 09:00:00 +0800 Subject: [PATCH] feat(shell-sync): run_cron_scheduler() part 3/3 --- platform/shell-sync/sync.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/platform/shell-sync/sync.sh b/platform/shell-sync/sync.sh index 830333be..490f5db6 100644 --- a/platform/shell-sync/sync.sh +++ b/platform/shell-sync/sync.sh @@ -350,3 +350,13 @@ run_cron_scheduler() { chmod 700 "$wrapper" printf '%s %s >> /proc/1/fd/1 2>&1\n' "$SYNC_CRON" "$wrapper" > "$crontab_file" + if ! crontab "$crontab_file"; then + log "Configuration error: SYNC_CRON is not a valid cron expression: $SYNC_CRON" + return 1 + fi + log "Starting cron schedule: $SYNC_CRON" + cron -f & + CRON_PID=$! + wait "$CRON_PID" +} +