Scheduler re-evaluates invalid cron expressions every tick, generating WARN at 2/sec #127

Closed
opened 2026-05-24 16:33:03 +00:00 by mik-tf · 0 comments
Owner

When an action is registered with an unparseable cron expression (for example 99 99 99 99 99 or literal English like invalid cron syntax here), the scheduler re-parses the expression on every tick (one per second) and emits a WARN each time, instead of treating the parse failure as terminal for that action. A single workstation accumulated 9,276 of these WARN entries over 1h17m of supervisor uptime from two such actions, which is pure noise to operators and a measurable share of supervisor CPU. Suggested fix: on first cron parse failure for a given action, log a single ERROR with the parse diagnostic, transition the action to a disabled state in the actions table, and surface that state to the operator UI so the operator can edit the cron expression. Re-enable should only happen on operator action (updating the spec). The supervisor must not re-attempt the same broken expression every second forever.

Signed-by: mik-tf mik-tf@noreply.invalid

When an action is registered with an unparseable cron expression (for example `99 99 99 99 99` or literal English like `invalid cron syntax here`), the scheduler re-parses the expression on every tick (one per second) and emits a WARN each time, instead of treating the parse failure as terminal for that action. A single workstation accumulated 9,276 of these WARN entries over 1h17m of supervisor uptime from two such actions, which is pure noise to operators and a measurable share of supervisor CPU. Suggested fix: on first cron parse failure for a given action, log a single ERROR with the parse diagnostic, transition the action to a `disabled` state in the actions table, and surface that state to the operator UI so the operator can edit the cron expression. Re-enable should only happen on operator action (updating the spec). The supervisor must not re-attempt the same broken expression every second forever. Signed-by: mik-tf <mik-tf@noreply.invalid>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_proc#127
No description provided.