As reported: D. E. Shaw Lead / Principal onsite round 1 (2026), after a food delivery LLD: an LLD of a job scheduler library — submit a job with a repeat schedule, such as every 30 minutes or every 6 hours.
Design a job scheduler library that an application embeds:
submit(job, schedule)— runjobaccording toschedule(one-off at a time, or repeating at a fixed interval such as every 30 minutes or every 6 hours); returns a handle.cancel(handle), and a way to see a job's next run time and last result.- Jobs run on worker threads; a slow job must not delay others.
Agree on scope first: what happens when a run takes longer than its interval, failure handling and retries, whether schedules survive a restart, and whether cron expressions are needed.