Scheduled checks failed after a Mac woke before its network was ready
Four failures arrived on the same morning
On October 8, 2026, four scheduled checks reported failures during the same inspection round. The immediate question was whether the products being checked had broken or whether something shared by the checks had failed.
The logs provided a reason to investigate the shared execution environment. The jobs had started later than their scheduled times. A check scheduled for 09:50 started at 09:53, and another scheduled for 10:10 started at 10:12. They also finished unusually quickly: between two and five seconds, compared with their normal duration of 30 to 50 seconds.
Those observations mattered together. The jobs were late to start but quick to fail. Their runtimes did not resemble ordinary completed inspections. Before treating the reports as separate product incidents, we needed to establish whether the checks had reached the work they were supposed to perform.
All four notifications also contained the same marker:
NOTIFIED ... after-net-wait
The underlying errors pointed to name resolution:
TypeError: fetch failed
[cause]: Error: getaddrinfo ENOTFOUND oauth2.googleapis.com
A manual rerun of one affected check passed all 12 of its checks. The incident record established that all four production systems were healthy. The failures were on the inspection side.
The failed reports were therefore real records of unsuccessful check executions, but they were false indications that the products themselves were broken. Keeping those two meanings separate was essential to finding the correction.
The network wait existed, but protected the notification
The scheduling behavior explained the late starts. In this incident, launchd fired jobs missed while the Mac was asleep immediately after it woke. Wi-Fi was not yet ready when those jobs began.
That produced the pattern visible in the logs: execution started a few minutes after the scheduled time, then ended within seconds with a name-resolution error. The checks needed the network before the machine had finished bringing it up.
A network-wait helper already existed. Its header even described earlier incidents of this type. The missing piece was not recognition that network readiness could be a problem. It was where the existing protection had been connected.
The shared job wrapper did not use the helper before running a job. It used it before retrying a failed notification.
The resulting sequence was straightforward. A job ran without a working network and failed. Its failure notification also could not be sent while the network was unavailable. The wrapper then waited for the network and retried the notification.
By the time the notification arrived, the network wait had done its job—but only for the report. It had not delayed the original inspection or given that inspection a chance to run under usable network conditions.
This explained why every notification carried the after-net-wait marker. The marker showed that a wait had occurred somewhere in the failure-reporting path. It did not show that the job had waited before execution.
The distinction was the central defect. The existing mitigation addressed the delivery of a failure message while leaving the failure-producing execution sequence intact.
The correction moved the wait before execution
The fix added a network-readiness gate to the job wrapper’s execution path. The wrapper would now invoke the existing helper before starting the job.
The wait was enabled by default, could be disabled through configuration, and depended on the helper being executable. Its default timeout was 180 seconds. The wrapper captured the helper’s output and recorded it when there was something to log.
For a timeout, the implementation recorded this explicit marker:
timeout-run-anyway
That marker expressed an important part of the design: waiting for the network was allowed to delay execution, but a timeout would not cancel execution.
For the wake-up failure described here, the intended sequence became: wait while the network becomes available, then run the check. A temporary readiness problem would no longer immediately become a failed inspection simply because launchd had started the job before Wi-Fi was ready.
When the network was already healthy, the job continued as before, without extra log output. The change targeted the period when execution was ready to begin but the network was not.
This was a change to the placement of an existing safeguard. The helper had already been available, and the incident pattern had already been documented. Moving the wait into the execution path made that safeguard apply to the operation that had actually failed.
It also gave the timeout behavior a visible record. A log containing timeout-run-anyway would distinguish a job that proceeded after the wait expired from one that started after readiness was established.
A timeout still had to let the job run
The shared wrapper served 22 plist definitions, including jobs that did not require the network. A video-building job was one such example.
That shared use ruled out a simple “wait, then cancel if still offline” policy. A network-independent job could succeed even during a genuine network outage. Cancelling it at the readiness gate would turn a condition irrelevant to its work into a reason it never ran.
The same policy would also weaken the evidence from network-dependent jobs. Skipping a check because the network was down could silently absorb a real failure. The fix needed to prevent premature execution after wake without creating a path that concealed continuing problems.
The expected behavior therefore depended on the situation. With a healthy network, execution remained unchanged. When connectivity arrived tens of seconds after wake, the wrapper waited and then executed the job. During a real network outage, a network-dependent job still ran and failed. A network-independent job still had the opportunity to succeed after the wait expired.
The test suite passed all five tests. Two negative tests covered the boundaries that mattered to this design: execution still happened after a network-wait timeout, and a genuinely failing job’s return code was not swallowed when the network was unavailable.
The same tests were also run against the unmodified wrapper. The record reports that only the second negative test failed against that version.
That comparison mattered because the tests were meant to detect behavior, rather than merely agree with the new implementation. The return-code test demonstrated a distinction between the old and revised wrapper. Alongside the timeout-execution test, it checked that adding a wait did not make failure disappear from the result.
Check the execution path, the timing, and the failure result
When several scheduled checks fail on the same morning, compare their shared execution conditions before investigating each report as an independent product bug. In this case, scheduled time, actual start time, and elapsed runtime exposed a common pattern.
Those are concrete values to inspect in your own logs. Look for jobs that start after their scheduled slots and finish much faster than their usual runs. Here, checks normally taking 30 to 50 seconds ended in two to five seconds. The short duration helped show that the intended inspection had not been completed.
Next, follow any readiness helper through the wrapper. Confirm whether it runs before the job, before a notification retry, or in both places. A log message saying the system waited for the network is insufficient unless its position in the execution sequence is clear.
Finally, test what happens when readiness never arrives. Check that jobs intended to run after a timeout actually execute, and that a failing job’s return code remains visible. If the wrapper also serves jobs that do not need the network, verify that the wait does not cancel them.
The useful lesson from this incident is specific: a safeguard can exist, recognize the right failure pattern, and still protect the wrong operation. The correction was to make the network wait precede execution while preserving the job’s ability to run and report a real failure.
Root Cause is written while shipping small software products — you can see them at TechAthletes.