Mock Interviewer

Ask Coach

Ask Coach
Clarify requirements before you design — kept separate from your stage notes.

Tap a question to start, or type your own below.

Job Scheduler System Design

Visual Problem Diagram

Job Scheduler System Design architecture diagram

Scenario

Picture a company that runs small background chores for its customers, such as sending emails, checking payments and building reports. Each chore is called a job, and the part of the system that decides when each job starts and which machine runs it is called a job scheduler. At midnight, 50,000 jobs become due in the same second, and most of them are marketing emails. One of them is a payment check that has to finish on time, but the email batch was taken first, so the payment check waits behind it. If a machine dies halfway through a job, the scheduler must also run that job again without charging a customer twice, so a good answer explains when jobs start, who runs them, and how a retry stays safe.

Stuck on where to start? Ask Coach

Clarify this problem here, or open Pathway Coach if you want a prep plan first.

Free Coach trial
How should I start prep?

This problem asks you to design a job scheduler, which is the part of a system that decides when each piece of background work should start and which machine should run it. A job is one such piece of work: sending an email, checking a payment, building a report. A team can hand the scheduler a job to run once, or a schedule that repeats, such as every night at midnight. They can mark a payment check as more important than an email, ask whether a job is waiting, running or finished, and cancel it. Machines called workers do the actual running, and a job that fails can be tried again.

In the interview you need to explain five things. First, how due jobs are spread out so that 50,000 of them do not all start in the same second. Second, how a payment job gets to run ahead of a pile of emails. Third, how a worker holds a job so that a second worker does not start it too. Fourth, what happens when a worker dies halfway through a job. Fifth, how a retry avoids charging a customer twice. A full graph of jobs that wait on other jobs can stay thin, so mention it briefly and move on.

Constraints

Functional

Submit a one-off job or a repeating schedule. Set which job matters more. Run it on a worker. Retry a failure. Cancel a job. Ask for its status.

Non-functional

The scheduler stays up about 99.9% of the time. A due job runs at least once. Each team gets a fair share of workers so one team cannot fill them all.

Scale

Millions of jobs a day across about 10,000 workers. The hot action is the top of the hour, when about 50,000 jobs become due at once, and that release is the heavy write.

Stages ahead

1Requirement Analysis
2API Design
3High-Level Design
4HLD Extensions
5Trade-offs

Not ready to design yet?

Try the free Coach trial — ask how to prep, what to practice first, or how InterviewCrafted works. Sign in when you want to start this problem.

Try Coach free

Log in to start practicing

Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.

Want full access now? View Pro pricing