GitHub Actions schedule not running? Causes and how to get alerted

A scheduled workflow that stops firing shows nothing in the Actions tab, because there is no run to show. Here is how to find the cause, and how to get an alert when a run is late or missing.

Updated

Short answer

The schedule event only runs workflows that exist on the default branch, can be delayed or dropped when GitHub is under heavy load, and is disabled in public repositories after 60 days with no repository activity. Add a final step that requests a heartbeat URL, and alert when it stops arriving.

Monitor your GitHub Actions free

Why a scheduled workflow does not run

CauseHow to checkFix
Workflow not on the default branchThe file only exists on a feature branchMerge it. The event only triggers a run if the workflow file exists on the default branch, and it runs the latest commit there
Disabled after inactivityThe Actions tab shows the workflow as disabled, in a public repositoryScheduled workflows are disabled automatically after 60 days with no repository activity. Re-enable it
Delayed under loadThe run starts minutes after the scheduled timeThe event can be delayed during high load. Allow for it in the grace period
Dropped under loadNo run exists for that time at allIf the load is high enough, some queued jobs may be dropped. You cannot prevent this, only detect it
Wrong time zoneThe run happens at an unexpected hourCron times are in UTC by default. Convert your local time
Interval too shortThe schedule asks for runs more often than every 5 minutesThe shortest interval is once every 5 minutes
Actor deprovisionedEnterprise Managed Users onlyScheduled workflows do not run if the last actor associated with the schedule has been deprovisioned

Re-enable a disabled workflow

  1. Open the repository and select the Actions tab.
  2. Pick the workflow in the left sidebar.
  3. Click Enable workflow.

The 60-day rule applies to public repositories. A repo that is quiet for two months has its schedule switched off without any alert, so a heartbeat is the only way you hear about it.

Add a heartbeat step

GitHub applies success() to every step by default. A step runs only if all previous steps succeeded, so a final curl step is skipped when the work fails. If the workflow never runs, the request never arrives either. One missing ping covers both cases.

.github/workflows/nightly.ymlYAML
name: Nightly job

on:
  schedule:
    - cron: '0 2 * * *'
  workflow_dispatch:

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7

      - name: Do the work
        run: ./scripts/nightly.sh

      - name: Ping heartbeat
        run: curl -fsS -m 10 --retry 3 "${{ secrets.HEARTBEAT_URL }}" > /dev/null

Store your heartbeat URL, which looks like https://heartbeat.uptimeio.com/heartbeat/YOUR_HEARTBEAT_TOKEN, as a repository secret named HEARTBEAT_URL. Treat it like a password.

FlagWhy
-fTreat an HTTP error as a failure
-sSNo progress output, but still print errors
-m 10Give up after 10 seconds instead of hanging
--retry 3Retry a brief network failure so one lost request is not reported as a missed run

The workflow_dispatch trigger adds a manual run button, which helps when you want to test the ping without waiting for the schedule.

Pick an interval and grace period

Because GitHub can delay a scheduled run, the grace period is the setting that stops false alerts. Include the usual run time of the workflow too, since the ping goes out at the end.

ScheduleIntervalGrace period
Every hour1 hour15 minutes
Daily at 02:00 UTC24 hours1 hour (the maximum)

These are starting points. After a few weeks, check how late your runs actually start and tighten the grace period.

Set it up in UptimeIO

  1. Create a monitor and choose the Heartbeat type.
  2. Set the interval and grace period from the table above.
  3. Copy the heartbeat URL into a HEARTBEAT_URL repository secret.
  4. Choose where alerts go: email, Slack, Telegram, Pushover or a webhook.

Heartbeat monitors are on every plan, including Free. A few details worth knowing:

  • Intervals: 1 minute to 24 hours, with a grace period of 1 second to 1 hour. The shortest interval is 5 minutes on Free and 1 minute on Pro and Scale.
  • Requests: GET or POST, no authentication.
  • Incidents: an incident opens when a ping is late, and resolves after 3 on-time pings in a row.
  • Rate limit: on Free, each URL accepts one ping every 120 seconds.

Questions

Why is my GitHub Actions schedule not running?
The usual reasons are that the workflow file is not on the default branch, the repository is public and had no activity for 60 days, or GitHub delayed or dropped the run during heavy load. Check the Actions tab for a disabled workflow first.
Why do scheduled workflows get disabled?
In a public repository, GitHub automatically disables scheduled workflows when there has been no repository activity for 60 days. Open the Actions tab, pick the workflow, and click Enable workflow.
Can GitHub Actions drop a scheduled run?
Yes. The schedule event can be delayed during periods of high load, and if the load is high enough, some queued jobs may be dropped.
What time zone does on: schedule use?
UTC by default. The shortest interval is once every 5 minutes.
How do I get an alert when a scheduled workflow fails or is skipped?
Add a final step that requests a heartbeat URL. It only runs if the earlier steps succeeded, and the monitor alerts you when the request does not arrive, including when the run never started.

Related

Start monitoring in a few minutes

Start monitoring free

Free plan · 50 monitors · No credit card required