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:
@@ -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
|
||||
),
|
||||
)
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user