GitHub Actions multiple cron schedules but only the first appears to run
on.schedule accepts a list of cron entries and each should fire on its schedule. When only one appears to run, the cause is usually malformed YAML collapsing the list, a workflow only on a non-default branch, or schedules drifting under heavy load - not a hard limit of one.
What this error means
A workflow with several scheduled cron entries only ever triggers from one of them.
on:
schedule:
- cron: '0 0 * * *'
cron: '0 12 * * *' # malformed: second cron folded into the first mappingCommon causes
YAML list malformed
Both cron values under one list item means only the last key survives; entries must each be their own list item.
Schedules only run on the default branch
Scheduled workflows trigger from the workflow file on the default branch; edits on other branches do not schedule.
How to fix it
Make each cron its own list entry
- Use a separate - cron: line per schedule.
- Validate the YAML so each entry is a distinct list item.
on:
schedule:
- cron: '0 0 * * *'
- cron: '0 12 * * *'Ensure the file is on the default branch
- Merge the scheduled workflow to the default branch so schedules register.
- Account for scheduling delay under high load.
How to prevent it
- Write one - cron: list item per schedule and validate the YAML.
- Keep scheduled workflows on the default branch.