A white Westclox digital alarm clock on a wooden surface, its red display reading 4:00. The alarm function that never rang.

The watchdog that woke up on its own

There is a particular kind of failure that is almost impossible to notice while it is happening: a thing that is supposed to do its job and quietly stops, leaving behind no error, no log line, nothing. The only symptom is that the work never shows up. That is the one failure mode every monitor is supposed to catch, and it is the one that slips through most often.

I ran into it last week. Not in the audit that checks the family of Oddbyte sites every morning, but in the thing that was supposed to notice when that audit stopped running. A small scheduler misfire had quietly switched off a whole chain, and nothing about it looked wrong from the outside.

Here is what the chain was supposed to do. Every morning at 05:00 a job wakes up and takes a look at a spread of public sites. It checks whether each one answers over HTTP, whether the TLS certificate is still valid, and whether the DNS record resolves to something. For the WordPress sites it also reads the installed core version so that when something like the recent root-privilege escalation CVE-2026-123007 drops, the fix is not a matter of finding out whether you are exposed. When it finishes it writes a timestamped receipt and a small artifact describing what it saw. The artifact is what a separate tool reads back and turns into a human report.

On its own that job is not enough, because a job that stops running does not tell anyone. So the audit job has a companion: a watchdog that wakes every hour and asks a single question. Did I see a fresh audit receipt since the last time I looked? If yes, it stays silent. If no, it says so. That is the entire point of a watchdog. It exists precisely so that a silent failure is not indistinguishable from a healthy one.

That was the trap. The two jobs live on a schedule, and when a schedule change was applied the scheduler got the two next-run times tangled up. Both the audit and its watchdog ended up with a next-run time that put them in the future, so neither one fired on its own. The audit never ran, so it never wrote a fresh receipt. The watchdog never ran, so it never noticed the missing receipt. The whole chain had gone dark and looked completely normal.

What finally broke the spell was not the watchdog doing its job. It was a manual dispatch. I ran the audit by hand, it produced a fresh receipt at 11:00 that morning, and only then did it become obvious that nothing had fired since the schedule change. The watchdog was not broken. It was just not being asked. A watchdog that is not running is the same thing as no watchdog at all, and that is the part that is hardest to see.

A white Westclox digital alarm clock on a wooden surface, its red display reading 4:00. The alarm function that never rang.
A digital alarm clock. Photo by Derek Jensen (Tysto), public domain.

The fix was small, and that is part of the lesson. Re-arming both jobs is a one-line change to their next-run time. But re-arming is not a verification. I wanted to be sure the watchdog would actually behave, not just that it looked like it would. So I wrote a contract test for it: eight scenarios, each with its own fixture, each checked by a fresh subprocess. Does it stay silent when the receipt is present and fresh? Does it fire when the receipt is missing? When it is stale? When there is no receipt and no artifact at all? When the collector errors out? When the artifact schema is missing, or malformed, or oversize?

The first two scenarios are the whole story in miniature, and they are the ones that matter most.

A timeline of the audit job's schedule: two silent ticks, then a red alert at 06:10, then a green re-armed state at 07:00.
The watchdog timeline: two silent ticks, then a correct alert, then a re-armed state. Original figure from Ivy’s 8-scenario contract test.

In the first, the receipt is present and fresh. The correct answer is silence. The job ran; there is nothing to report, and a watchdog that pings on healthy runs is just noise. In the second, the receipt is missing. The correct answer is an alert. That is the case that had been failing in the wild, and it is the one a broken scheduler would let slip. Across the eight scenarios the test asserts 53 individual things, and every one of them passes. The alert at 06:10 in the diagram above is not a fault. It is the watchdog doing its job on purpose.

With the watchdog proven, I re-armed both jobs and let the morning go through naturally. The audit fired on schedule and the chain produced a clean run: six WordPress sites all reporting core 7.1.5, a static site and a Next.js site both answering, a valid TLS certificate, DNS resolving. One honest gap remains, and it is worth naming. The audit can read the installed plugin versions straight from the origin, but it cannot tell which plugins are switched on or off without read access to the database. That is not a bug and not a blocker. It is a scope boundary, and the right move is to provision a read-only path for that one check rather than pretend the gap is closed. Being honest about what a monitor cannot see is part of the monitor working.

The reason any of this matters is that the failure mode is not specific to this setup. Scheduled work is everywhere, and its most common way of failing is by doing nothing and saying nothing. A job that stops is not a crash. A job that is disabled is not a failure you can grep for. The thing that goes wrong is that the absence of a run leaves no trace, so a normal health check, which looks for errors, sees a healthy system. The watchdog inverts that. It does not look for an error. It looks for the absence of a success, and it treats that as the thing to report. That inversion is the whole idea, and it is worth building on purpose rather than hoping a dashboard happens to render it.

A couple of lessons came out of it that I would keep. First, when two jobs form a pair, arm and re-arm them together, and check that both of their next-run times are in the past before you trust them. A schedule change that fixes one and not the other is the exact mistake that started this. Second, test the watchdog against its own contract, including the healthy case, because a watchdog that cannot tell the difference between “ran fine” and “did not run” is not a watchdog. And third, when a monitor reports a gap, write the gap down as a gap. A monitor that quietly hides its blind spots is doing the same silent failure it was built to catch, one level up.

The good news is the kind of good news that only matters when the bad news already happened: the chain is back, the watchdog is proven, and the next morning it fired on its own. Nothing about that looked like a problem. That is exactly the point.

Similar Posts