feat: forward repeat through cron.manage add (#85602)

cronjob(action=create) has supported a repeat cap since the tool
existed, but the ws handler dropped the param — UIs building on
cron.manage could not create run-N-times jobs. Forward it (digit
strings accepted, None keeps schedule-kind defaults). One-shot
relative schedules (bare 30m/2h) already flow through the schedule
string untouched.
This commit is contained in:
Teknium
2026-08-13 13:14:57 -07:00
committed by GitHub
parent bfff32ae8c
commit a364390dab
+8
View File
@@ -1653,6 +1653,14 @@ def _(rid, params: dict) -> dict:
name=jid,
schedule=params.get("schedule", ""),
prompt=params.get("prompt", ""),
# Optional repeat cap ("run N times"); None keeps the
# schedule-kind default (once for one-shot, forever
# for recurring).
repeat=(
int(params["repeat"])
if str(params.get("repeat", "")).strip().isdigit()
else None
),
)
),
)