A failed GitHub Actions run sends you an email. A scheduled run that never starts sends nothing.
If you use on: schedule for backups, data syncs, reports or cleanup, these are the ways a run quietly goes missing:
- Delays and drops under load. GitHub documents that scheduled runs can be delayed during periods of high load, and some queued runs may be dropped. The top of the hour is the busiest time.
- Auto-disable after 60 days. In public repositories, scheduled workflows are disabled automatically when there has been no repository activity for 60 days.
- The workflow file moved or broke. Schedules only run from the default branch; a YAML error or a rename on that branch stops them without a failed run to look at.
The fix: a heartbeat as the last step
Instead of watching for failures, expect a "still alive" signal. If it doesn't arrive on time, alert.
on:
schedule:
- cron: "17 3 * * *"
jobs:
backup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ./backup.sh
- uses: yeogreenji/cronbeat-action@v1
with:
key: ${{ secrets.CRONBEAT_KEY }}
- if: failure()
uses: yeogreenji/cronbeat-action@v1
with:
key: ${{ secrets.CRONBEAT_KEY }}
status: fail
What you get:
- the run is skipped, dropped or disabled → no ping → alert after the grace period;
- the job fails → the
failping alerts immediately; - it recovers → an "UP" message.
The action is a thin wrapper around one curl, so you can also call the ping URL directly from any step, or from a server cron, a Kubernetes CronJob or a Laravel scheduler.
Choosing period and grace
Set the period to your schedule interval and give generous grace (30 to 60 minutes for hourly or daily jobs), because GitHub can start scheduled runs late. Also avoid minute 0: a minute like 17 is less likely to be delayed.
Disclosure
I build CronBeat, the free heartbeat monitor used above (20 checks free, no signup; Slack, Discord or phone push alerts). Any heartbeat service works with the same pattern. The full guide, including alert setup, is here: https://yeogreenji.github.io/cronbeat/github-actions/
Top comments (0)