Before you start. This lesson assumes you built the small scheduler across the seven lessons before it, so here is what it can already do, one line each:
It writes a job down as a rule with a time zone, in a table that survives a restart, instead of a variable a crash erases.
It works out the exact next moment a job is due, freshly, in the zone the rule names.
It keeps every job’s next-due moment in one ordered pile, so it can always name the soonest one without checking every job in turn.
It sleeps until that exact moment, wakes up, and finds the job due.
It runs several copies at once for safety, but lets only one of them act on any job at a time.
It hands the actual work to separate helper programs, called workers, instead of doing the work itself.
It survives a worker doing the same job twice by accident, so the customer only ever sees it once.
Lesson 69 of 117 in From Scratch
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.