Cron: persist enabled=false patches

Closes #205
This commit is contained in:
Shadow
2026-01-12 22:16:07 -06:00
parent 1cf45f8439
commit e15d5d0533
3 changed files with 51 additions and 0 deletions

View File

@@ -65,6 +65,17 @@ export function normalizeCronJobInput(
}
}
if ("enabled" in base) {
const enabled = (base as UnknownRecord).enabled;
if (typeof enabled === "boolean") {
next.enabled = enabled;
} else if (typeof enabled === "string") {
const trimmed = enabled.trim().toLowerCase();
if (trimmed === "true") next.enabled = true;
if (trimmed === "false") next.enabled = false;
}
}
if (isRecord(base.schedule)) {
next.schedule = coerceSchedule(base.schedule);
}