Background

I run about 20 small sites and update them automatically. A batch runs four times a day, decides which sites have work due, and then does only that work.

The decision itself lives in one script, whats-due.js. Its only inputs are tasks.json (task definitions), state.json (run state), and today's date. No network calls, no randomness, so the same inputs always produce the same answer. That determinism is what makes the whole thing safe to re-run after a crash.

But a correct decision and a workable decision are two different things. This post is about the second one: what to do when the number of due tasks keeps exceeding what a single run can finish.

How it works