Scheduled Workflows Fail Silently: A GitHub Actions Heartbeat for 122 Repositories
By Vladimir Mikhalev Docker Captain · CNCF Ambassador · IBM Champion Blueprint 19 The silence check: a schedule is alive when it fired, not when its last run passed
GitHub disables a scheduled workflow in a public repository after 60 days without repository activity. No run fails and no badge turns red, and the last green run stays on the README for as long as anyone looks. Every scheduled job in my fleet fails loudly when it finds a problem, and none of them can fail when it stops running. The thing I built to close that gap watched 526 live schedules across 122 public repositories on 23 November (run 45246359660). It has also been wrong, on the record, more than once, and each time is a rule now.
Nothing can report its own silence. That is not a GitHub defect; it is what a schedule is. A cron fires or it does not, and the job it would have started is the only thing that knew it was due. The same blindness that lets a health check stay green over a core dump lets a daily verification stop in April and keep its badge until somebody asks in June.
What a stopped scheduled workflow looks like
A workflow that verifies a template daily, and the state it is in after two quiet months:
# .github/workflows/deployment-verification.yml in the Outline template at# v2.2.8: a daily boot test, the kind that stops without a soundon: push: branches: - main pull_request: branches: - main schedule: # Daily rebuild: security patches should not wait for a weekly slot. - cron: "0 6 * * *" workflow_dispatch:$ gh api repos/OWNER/REPO/actions/workflows \> --jq '.workflows[] | select(.path | endswith("deployment-verification.yml")) | .state'disabled_inactivityThat is the state GitHub’s API gives a workflow it has switched off for inactivity, and the state a repository of mine would show after two quiet months; the live ones answer active, because something now asks.
The state is on the workflow, not on any run. A check that counts failed runs sees none. A check that counts successful runs sees the last one and is satisfied. The badge in the README is generated from the latest run, which succeeded. Three views of the repository, all green, over a job that has not started in a month.
The heartbeat asks a different question. For every workflow with a cron, it asks GitHub when the schedule last fired, reads the interval from the workflow’s own cron line, and reports one that is switched off or has not fired inside its own interval:
# scripts/fleet-heartbeat.py at fleet-ops v1.0.0:# did the schedule FIRE, measured from its own cron, not "did it pass"def schedule_late(full, wf, now, tolerance): fired = last_fired(full, wf["id"]) if fired is None: return None, 0 # no schedule, or one that has never fired age = (now - fired).total_seconds() / 3600 if age <= 24: return None, 1 # inside a day: no schedule here is that fast period = declared_period(full, wf["path"]) if period is None: return None, 0 # scheduled runs but no cron now: descheduled on purpose if age > period * tolerance + 2: changed = last_changed(full, wf["path"]) if changed and changed > fired: age = (now - changed).total_seconds() / 3600 if age > period * tolerance + 2: return ("%s: %s last fired %.0f hours ago; its cron is every %.0f hours" % (full, wf["path"].split("/")[-1], age, period)), 1 return None, 1Whether the run passed is a different question with a different report. A daily job that fails daily is a different fact from one that stopped, and the first version of this check confused them: filtering on successful runs only made a template whose CI had failed three days running look like a schedule that had died.
A server I run keeps the same rule for its nightly off-site copy: the sync writes a heartbeat only after it succeeds, and the alarm reads the heartbeat’s age, not the sync’s exit code. When Google refused the stored credential, the report said the off-site copy was 26 hours old, and the check turned unhealthy two and a half hours after the run that never happened. Nobody had to notice that something was missing. The refusal was the invalid grant error, which the OAuth specification uses for a grant or token that is invalid, expired or revoked, so one request tells a client problem from a grant problem and cannot tell expiry from revocation. Google expires the tokens of an app still in testing after seven days, and this one had worked every night for three months, so it had been revoked, and a new sign-in fixed it. The fix counted only when the copy matched again: 1,724 objects and about 16.6 GiB on both sides, and the check healthy.
Why this keeps happening
The platform is explicit about the behaviour. GitHub’s own documentation says that in a public repository, scheduled workflows are automatically disabled when no repository activity has occurred in 60 days, that the schedule event can be delayed during periods of high load, and that under enough load some queued jobs are dropped. All three are reasonable platform decisions. Neither produces a signal that reaches the person who wrote the cron.
The delay is its own finding. Measured across every scheduled job in the fleet’s operations repository, each lands late, by two to eight hours over September:
# declared (UTC) arrived (UTC), September05:00 10:2206:45 11:4708:00 14:55A comment in the workflow explained the schedule as a sequence, this job half an hour after the one it depends on, and the reasoning survived only because both of those are morning jobs, late by about the same amount. A cron on this platform buys an ordering. It does not buy a time of day, and anything that needs one cannot be a cron here.
The third reason is that the alarm, once built, has to be believed, and an alarm that cries wolf is muted like any other. The heartbeat’s own false alarms are in the ledger and the fleet’s commit history, each with the rule it produced. It reported 91 repositories stopped on a Sunday about Tuesday jobs, because it inferred the interval from the gap between runs and every weekly workflow had exactly one scheduled run in its history. It reported three templates 62 hours late the evening their cron moved from weekly to daily, measuring from a schedule that no longer existed. It reported a daily verification silent for four days while runs from each of those days sat in the repository, the last of them finishing two hours before the run that asked, because a date-filtered query came back short.
A false alarm from the job that says a watcher stopped costs more than a missed one. Its whole value is that somebody believes it.
Risk and blast radius
Direct exposure is every number that a stopped job would have moved. The evidence page carries the drill times, and they are read from a file a scheduled job writes. With the job stopped, the file keeps its last values and the page keeps saying them, correctly and indefinitely. A reader deciding whether to trust the fleet would be reading a photograph.
Systemic exposure is the class of job that nothing else covers. Digest freshness checks, the daily boot of every template, the weekly clean-machine drill, the secret scan, the conformance sweep: 526 live schedules on 23 November, every one of them a promise that something happens on its own. The fleet’s claim in one line is that every template boots in CI daily. The claim is true only while those schedules are alive.
The third exposure is the watcher itself. On 24 September a commit from a clone that had lost its git configuration deleted twenty tracked files from the operations repository, workflows among them, under a message that spoke only of the workflow it added. The heartbeat reads the repository’s own schedules from the checkout, so it saw a shorter list and no gap. Sixteen hours passed before the daily triage’s error line, a Python module it imports that could no longer be found, was read by a person. The set of watchers is a list that may only shrink on purpose.
What the heartbeat found once it was believed
The first weeks produced findings nothing else in the fleet could have produced, because each was a thing that had stopped rather than a thing that had failed.
Dependabot had been pushing branches to two repositories that could not hold a pull request. Issues were off on both, a pull request is an issue, so Dependabot pushed a branch and then failed to open the pull request that would deliver it, quietly, on a schedule, for fourteen days. A tool that reports success by opening something cannot report the failure to open it. The heartbeat now looks for what the tool left behind instead: a Dependabot branch with no pull request is the whole signal.
A Dependabot pull request sat green and mergeable for 57 hours in a repository whose auto-merge job was working correctly. The job triggers when the verification completes, and the verification had completed at twenty-five to eight in the morning, UTC, on a day when the auto-merge workflow reached the default branch at a minute to midnight. Sixteen hours too late to ever hear about it, and nothing re-fires. An event-driven job is deaf to everything that happened before it existed. The stuck-pull-request check asks rather than listens: any Dependabot pull request open more than 24 hours is a line in the report.
The job that files the report printed opened a new thread for two repositories and went green, and neither issue existed. The credential could not write there, the create ran unchecked, and the message after it was printed on the way past. Two reports lost, zero signals raised, by the one piece of machinery whose job is raising them. The reporter now fails on refusal and prints the undelivered report into the log.
And a coverage line, because a check that examined nothing and a check that found nothing print the same empty result. The sweep now says what it did, and on 23 November it said 120 of 122 repositories read, 4 open pull requests seen. A line of that shape, every repository read and not one pull request seen, is what exposed a pull request 45 hours old sitting in one of them.
Reading worked. Seeing did not. The sentence that says both is the fix.
Framework: ask the platform, keep one thread, keep a witness outside
The heartbeat is one Python file and one workflow, and its rules are tested by fabricating runs so the cases that matter can be produced on demand rather than waited for. Any fleet of scheduled jobs needs the three layers below, and most have none.
Layer 1: ask the platform about the schedules, not the jobs about themselves (week 1)
List every workflow the platform knows about, read the state it holds on each, and measure the age of the last scheduled run against the cron the file declares. The list comes from the platform’s own list of workflows for each repository, not from a hand-kept table, and the interval comes from each workflow’s own cron line, because a hand-kept list falls behind the files it describes. The clock starts at whichever is later, the last run or the last change to the workflow file, so a cron edited yesterday has not missed anything yet. Here is the Keycloak template’s latest scheduled run, as the API answered on 27 September:
$ gh api "repos/heyvaldemar/keycloak-traefik-letsencrypt-docker-compose/actions/workflows/265440799/runs?event=schedule&per_page=1" \> --jq '.workflow_runs[0] | {created_at, status, conclusion}'{"conclusion":"success","created_at":"2026-09-27T11:44:51Z","status":"completed"}Query runs by workflow id, not by file name, and skip entries whose path is not inside the workflows directory: GitHub’s own Dependabot and Pages entries live outside it, answer 404 when asked for by name, and are not schedules anyone in the repository wrote.
Owner: platform engineer.
Layer 2: one thread per watcher, and a finding that is new is not the same as one that is true (week 2)
Actions mail is switched off across this fleet, because at ninety repositories it is a hundred messages a week that say the same thing, and a hundred messages nobody reads are the same as none. Each watcher keeps exactly one open issue, rewrites its body when the findings change, comments once when they change, and closes it when they clear. A finding that is the same as yesterday’s with a larger number of hours in it is not a change and sends nothing; the hash is taken with durations blanked.
A gap that is true and accepted on purpose goes in a file, and the file is the only way to buy silence. The fleet’s version names repositories its token is known not to read. A person adds a name, in a diff, in review; the heartbeat reports any name on it that it can read after all, because a list that only ever grows ends up accepting everything:
# scripts/known-gaps.txt in fleet-ops at v1.0.0, its opening lines# Repositories the fleet's token is known not to read, accepted on purpose.## THIS LIST IS EMPTY, AND THAT IS THE HEALTHY STATE. Every name here buys# silence for one repository: the heartbeat goes on reporting it, but stops# turning its run red over it. Nothing is accepted at the moment, so any# repository that falls out of reach is reported red and by name.On 18 September it held eleven names, the day the heartbeat first looked at the private half of the fleet. Two days later a second, read-only token closed the gap and the file was empty again, which is the test of whether a baseline is a baseline or a place findings go to be forgotten.
Owner: SRE, who reads the thread.
Layer 3: a witness outside the platform, a manifest of the watchers, and the push runs too (week 3 onward)
Nothing running on GitHub can report GitHub not running it. The heartbeat’s own run pings a switch outside GitHub that alarms on a missing ping, the dead man’s switch pattern that healthchecks.io and its self-hosted equivalents implement:
# .github/workflows/fleet-heartbeat.yml at fleet-ops v1.0.0, shortened:# the run tells a witness outside GitHub that it happened- name: Tell something outside GitHub that this ran # ... fourteen lines of why: the absence of a ping is the alarm if: always() env: PING: ${{ secrets.HEARTBEAT_PING_URL }} # ... two variables that keep a rehearsal copy from pinging run: | # ... the rehearsal copy stops here if [ -z "$PING" ]; then echo "no external witness: set HEARTBEAT_PING_URL (healthchecks.io or any switch that alarms on a MISSING ping) so that GitHub not running this at all is also visible" \ | tee -a "$GITHUB_STEP_SUMMARY" exit 0 fi code="$(curl -sS -m 20 -o /dev/null -w '%{http_code}' --retry 3 "$PING")" case "$code" in 200|201|204) echo "external witness pinged" ;; *) echo "::error::the external witness answered HTTP ${code:-000} — it did not record this run, so its alarm is now the only thing that would notice, and it cannot"; exit 1 ;; esacA witness outside also hears schedulers that are not GitHub’s. The same kind of switch watches the timers on a host I run, and on the night the clocks went back it showed that host down for 55 minutes while it was up. The alarm was right about the thing it watched. For an hour, not one timer written in local time ran: on systemd 255 a calendar of every five minutes is read in wall-clock time, so the run five minutes before the change asked for the next mark on the clock, and the clock reached that mark an hour and five minutes later. The host’s own checks saw only symptoms: two games it watches showed as offline while they were running. Only the witness asked whether anything had run.
# systemd-analyze on systemd 255 in a container:# the same calendar in local time and in UTC across one zone's change back,# here Australia/Sydney on 5 April 2026 (trimmed to the next run)$ TZ=Australia/Sydney systemd-analyze calendar --base-time="2026-04-04 15:59:59 UTC" "*:0/5" Next elapse: Sun 2026-04-05 03:00:00 AEST (in UTC): Sat 2026-04-04 17:00:00 UTC$ TZ=Australia/Sydney systemd-analyze calendar --base-time="2026-04-04 15:59:59 UTC" "*:0/5 UTC" Next elapse: Sun 2026-04-05 02:00:00 AEST (in UTC): Sat 2026-04-04 16:00:00 UTCOne second before the change, the local calendar’s next run is an hour away, and the same calendar in UTC runs on time. Two of my public templates carried calendars like the first. Both now write them in UTC, with an OnUnitActiveSec net a little longer than the period, so a run the calendar misses is made up within one more period. A test in each, one and the other, asks systemd-analyze for a fall-back night and fails on the same calendar without UTC. The first diagnosis was wrong, and how it was wrong belongs here: it read the timer files as they are now, already fixed, as the files that ran on the night, and git log showed the difference. When the question is what ran, read the history of the file, not the file.
The manifest closes the deletion case: a file names the workflows the operations repository is supposed to carry, and the heartbeat fails when one is missing from the checkout or present and unlisted. The host’s watch lists got the same treatment: 147 comparisons against what actually runs, and one service missing from a list it belonged on. And the push-triggered workflows get a line too, because the scheduled sweep never sees them. The fleet’s own test suite was red on main for fourteen hours on 24 September while every scheduled job was green and the heartbeat said the machinery was fine; the latest push run of every push-triggered workflow is now judged with the rest:
# scripts/fleet-heartbeat.py at fleet-ops v1.0.0:# a push-triggered workflow red on main is a finding like any otherfor name in push_workflows(root): meta = states.get(name) if not meta or meta["state"] != "active" or name in scheduled: continue runs = newest_first(gh("repos/%s/actions/workflows/%s/runs?event=push&branch=main&per_page=1" % (repo, meta["id"]))["workflow_runs"]) if not runs or runs[0].get("conclusion") in (None, "success", "cancelled", "skipped"): rows.append((name, "ok", "on push")) continue findings.append(explained(name, "%s is red on main: its latest push run ended in %s" % (name, runs[0]["conclusion"]), runs[0].get("id")))Owner: SRE, with the witness’s alarm routed to a phone.
Tradeoffs
The daily sweep took about twenty-four minutes a run in November, roughly 700 runner minutes a month, and has cost nothing since the engine went public on 26 September. It also costs one more secret to hold: the witness’s ping URL.
The common fix is a keepalive: re-enable every workflow through the API on a timer, gh workflow enable in a loop, or push an empty commit, and the 60-day clock starts again. It works, and it hides the one signal worth having, that a repository has gone quiet. This fleet lets the schedule stop, reports it by name, and leaves the decision to re-enable with a person, because a repository nobody has touched in two months is a question, not a chore. The rules cost more than the minutes. Every false alarm in the ledger was a morning spent believing the alarm before disproving it, and each became a planted case so it could not return.
The alternative is the photograph: a profile and an evidence page that keep saying last month’s numbers, a badge that stays green over a job GitHub switched off in April, and a Dependabot branch that nobody will ever see. None of those costs anything until the day somebody checks, and on that day it costs the trust the numbers were there to earn.
Every false alarm on the record, each turned into a rule. Against a watcher that never speaks.
The closing argument
A scheduled job can fail loudly and cannot stop loudly, so the question to ask the platform is whether the schedule fired, not whether the job passed. Ask it from a list the files themselves produce, report once per watcher into a thread a person reads, separate what is new from what is merely true, and put one witness outside the platform for the case where the platform is the thing that stopped. The heartbeat’s own defects fill ten entries of the ledger, which is the difference between a watcher that is trusted and one that is believed.
Sources
- GitHub, Events that trigger workflows (scheduled workflows disabled after 60 days of inactivity; delays and dropped jobs under high load; notifications to whoever last edited the cron), accessed September 2026
- GitHub, Disabling and enabling a workflow, accessed September 2026
- GitHub, REST API, workflow runs (listing runs by workflow id and event), accessed September 2026
- healthchecks.io, Documentation (the dead man’s switch: an alarm on a missing ping), accessed September 2026
- heyvaldemar.com, Ledger (the heartbeat’s findings and several of its own false alarms) and Decisions (decisions 9 and 10)
Discussion
If you have found a schedule that had been switched off for months, or you watch your watchers some other way, drop a comment below. Counterarguments are welcome and the comment thread is where I respond first.