Skip to content
Latchkey

GitHub Actions schedule cron not triggering (default branch only)

Scheduled workflows always run against the version of the workflow on the repository default branch. A schedule defined only on a feature branch will never fire.

What this error means

A cron-scheduled workflow does not run on time, while the same file exists only on a non-default branch.

github-actions
# This schedule only fires if this file is on the DEFAULT branch
on:
  schedule:
    - cron: '0 6 * * *'

Common causes

Schedule defined off the default branch

Cron triggers are evaluated from the default branch copy only.

Repository inactivity disabling schedules

Scheduled workflows can be auto-disabled after long repo inactivity.

How to fix it

Place the schedule on the default branch

  1. Merge the workflow with on: schedule to the default branch.
  2. Confirm the repo is active so schedules are not auto-disabled.
  3. Remember cron times are UTC and may run with some delay.
.github/workflows/nightly.yml
on:
  schedule:
    - cron: '0 6 * * *'   # 06:00 UTC daily, from default branch

How to prevent it

  • Define schedules on the default branch and keep the repo active.
  • Account for UTC and possible scheduling delay during peak load.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →