Schedule plus concurrency cancelling scheduled runs in CI
A concurrency group with cancel-in-progress: true cancels older runs in the same group. If your scheduled workflow shares a group key with push runs, a push can cancel the nightly job (or the schedule can cancel a deploy).
What this error means
Scheduled runs show as "Canceled" shortly after starting, and the cancellation coincides with a push or another run that shares the same concurrency group.
.github/workflows/nightly.yml
concurrency:
group: deploy # shared by push AND schedule
cancel-in-progress: true
# A push to main cancels the in-progress nightly run in group "deploy".Common causes
A shared concurrency group across triggers
When push and schedule use the same static group key, cancel-in-progress lets one cancel the other.
cancel-in-progress on a job that should complete
A nightly job that must finish should not be cancellable by newer runs in the same group.
How to fix it
Scope the concurrency group per event
- Include the event name or run id in the group key.
- Disable cancel-in-progress for jobs that must complete.
- Verify pushes no longer cancel scheduled runs.
.github/workflows/nightly.yml
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: falseSeparate schedule and push groups
Give scheduled runs their own group so push activity cannot cancel them.
.github/workflows/nightly.yml
concurrency:
group: nightly-only
cancel-in-progress: falseHow to prevent it
- Include the trigger in the concurrency group key.
- Only use cancel-in-progress where cancellation is safe.
- Keep scheduled deploy jobs in a dedicated group.
Related guides
Duplicate or skipped scheduled runs in CIFix GitHub Actions scheduled workflows that occasionally run twice or skip a slot - schedule delivery is best…
Scheduled deploy gating with environment approval in CISet up a GitHub Actions scheduled deploy that gates on an environment approval - and understand why a require…
Scheduled cron runs late (timing is not guaranteed) in CIUnderstand why a GitHub Actions scheduled workflow starts minutes late - the schedule event is best-effort an…