A scheduler decides when work becomes ready#
A queue answers “what can run now?” A scheduler also answers “when?” for a 9 AM notification, nightly report, delayed retry, or recurring cleanup.
Small systems can query an index on run_at. Larger workloads may use time buckets, near-term queues, or timing-wheel ideas. No one mechanism is mandatory. Distributed ownership needs leases or another coordination mechanism, and downtime recovery must discover missed jobs.
Use these prompts to extend the design. The useful answer is a reasoned change, not a memorized sentence.
- What does a recurring job mean across daylight-saving changes?
- What if millions become due at once?
- How does a replacement scheduler avoid duplicate dispatch?
- How far behind may execution run?
Related practice problems
Use the manifest-backed prompts below to apply this lesson in a complete design.
- Probabilistic data typesRedis Documentation