Katkat

Design a Task Scheduler

OtherSoftware Engineer · Onsite

Last updated

Design a durable task scheduler with due-time indexing, atomic claims, worker leases, retry states, recurring occurrences, and clear duplicate-delivery semantics.

Constraints & Assumptions

The reported system-design prompt is a task scheduler without detailed scaling requirements. Start with a modest durable design and state whether tasks are one-time or recurring; do not assume an unreported global scale.

Clarifying Questions

What timing precision and lateness are acceptable? Are tasks recurring? What execution duration, retry, cancellation, and duplicate-effect guarantees are required?

Follow-up questions

  • How do you avoid two schedulers dispatching the same due task? What happens on a crash after dispatch? How would you add recurring schedules or partition the service if load grows?