Skip to content

0022. Deterministic Schedule Jitter for AI CronWorkflows

  • Status: accepted
  • Date: 2026-06-04
  • Deciders: lusoris
  • Related: PR #1171

Context

Before PR #1171, 39 AI CronWorkflows fired at minute :00 and contended for the single OVMS Qwen backend. The change redistributed movable jobs while preserving each job's cadence, hour, day-of-week, and the recorded Stash nightly-chain ordering.

Decision

Assign each movable AI CronWorkflow a deterministic minute derived from sha256(app-name) % 60, using collision-aware linear probing so movable batch jobs do not share a wall-clock minute. Leave the eight already tuned Wave-1 jobs unchanged.

Alternatives considered

None recorded at decision time; documented retroactively.

Consequences

PR #1171 changed the minute field across the affected apps/ai/* CronWorkflow schedules: the :00 population fell from 39 jobs to four retained Wave-1 jobs, and no two movable batch jobs shared a minute after probing.

References

  • PR #1171 — perf(ai): deterministic schedule jitter across ai/* CronWorkflows (Wave 2)