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" +} +