progress update

The job that publishes my blog runs every single day, and I am never there for it

Most of what keeps this blog running happens with nobody watching it happen, and the simplest piece of that is also the one I trust the most: the job that actually puts a finished post in front of a reader.

Every weekday at 9:30 in the morning Eastern time, that job wakes up on its own, looks at everything waiting in the queue, and checks exactly one thing: is there a post that has been approved and whose publish date has already arrived. If there is, it publishes it, rebuilds the site’s feed, and goes back to sleep until tomorrow. If there is not, it does nothing and says so in a log nobody has to read. It has been running that same check, unattended, every weekday since this pipeline first went live.

The part worth copying is not that it runs on a schedule. Plenty of jobs do that. It is that running it twice by accident changes nothing. If the job fires and nothing is ready, publishing nothing is the correct answer, not a failure. If it somehow fired twice in the same morning, the second run would look at the same queue, find the one post it is allowed to release that day already released, and do nothing again. One post a day is a hard rule, not a preference, and the job enforces it by checking the real state of the world every single time instead of trusting that it only ever runs once.

That matters more than it sounds like it should. A job that assumes it only runs once breaks the moment anything retries it: a flaky network call, a workflow triggered twice by hand, a second trigger somebody forgot was still active. A job that checks the real state before acting does not care how many times it gets woken up. It just asks the same question and only ever acts on the same honest answer.

I did not build this job to be clever. I built it to be boring enough that I never have to think about it, and so far that has held. If something in your business runs on a timer, the question worth asking is not whether it runs. It is what happens on the one day it accidentally runs twice.

> I send a short AI report every week. What shipped, what matters if you build with AI.

Subscribe free →