mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 08:07:40 +00:00
Cron: guard missing expr in schedule parsing
This commit is contained in:
@@ -41,5 +41,7 @@ export function resolveCronStaggerMs(schedule: Extract<CronSchedule, { kind: "cr
|
||||
if (explicit !== undefined) {
|
||||
return explicit;
|
||||
}
|
||||
return resolveDefaultCronStaggerMs(schedule.expr) ?? 0;
|
||||
const expr = (schedule as { expr?: unknown }).expr;
|
||||
const cronExpr = typeof expr === "string" ? expr : "";
|
||||
return resolveDefaultCronStaggerMs(cronExpr) ?? 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user