Scheduler 06: Idempotency and Fencing

The board that closes two problems the two boards before it opened and left running loose: Scheduler 05: Dispatch Queue, which guaranteed a job could be delivered more than once, and Scheduler 04: Leader Election, which let the machine in charge keep believing that after it no longer was. Hands off to Scheduler 07: The Hard Part - Time.
Before you start. This series builds a small scheduler: a program that runs jobs at set times across many machines instead of one, the way a single computer’s cron already does for one. Two things about it are already true. One machine at a time is elected leader, using a lease, a lock with a clock on it, so the right to give orders runs out on its own if nobody renews it. And a queue sits between the leader and the workers, and if a worker doesn’t answer back in time, the queue assumes the worst and hands the same job to someone else. Both are sensible, and both, pushed to their honest end, leave a crack open. This lesson closes it.