GitHub Actions: scheduled workflow not triggering [2026 fix]
Scheduled workflows fail silently when cron syntax is invalid or workflow file has syntax errors in the schedule block.
GitHub Actions: Scheduled Workflow Not Triggering — 2am Emergency Fix
TL;DR
Cause: Your cron schedule syntax is invalid or the workflow file has YAML parsing errors in theschedule block.
Fix: Validate cron with crontab -e locally, ensure your workflow file uses valid YAML (check indentation), and confirm the default branch matches your workflow file location.---
Exact Error Messages You'll See
Error 1: Silent failure (nothing in logs)
``` No workflow runs appear in Actions tab despite waiting 5+ minutes Workflow file shows in editor but "scheduled" indicator is missing ```Error 2: Invalid cron detected (if you enable debug logging)
``` YAML parsing error in .github/workflows/deploy.yml: - Cron expression "0 0 * * *" has invalid syntax at position 4 ```Error 3: Workflow disabled
``` Workflow is disabled. Enable in Settings > Actions > General or commit a change to re-enable after 60 days of inactivity ```Error 4: File not on default branch
``` Scheduled workflow only triggers if .github/workflows/*.yml exists on your repository's default branch (main/master) ```Error 5: Syntax error in YAML
``` Error parsing .github/workflows/schedule.yml: mapping values are not allowed here (line 8, column 12) ```---
Broken Code → Fixed Code
Problem 1: Invalid Cron Syntax
BROKEN: ```yaml name: Nightly Deploy on: schedule: - cron: '0 2 * * *' # ❌ Missing leading zero, inconsistent format ```
FIXED: ```yaml name: Nightly Deploy on: schedule: - cron: '0 2 * * *' # ✅ Valid: min(0) hour(2) day(*) month(*) dow(*) jobs: deploy: runs-on: ubuntu-latest ```
Why: Cron requires exactly 5 fields: minute hour day month day-of-week. GitHub uses UTC timezone. Test locally with crontab -e first.
---
Problem 2: YAML Indentation in Schedule Block
BROKEN: ```yaml name: CI on: schedule: - cron: '0 2 * * *' # ❌ Wrong indentation level push: branches: [main] jobs: test: runs-on: ubuntu-latest ```
FIXED: ```yaml name: CI on: schedule: - cron: '0 2 * * *' # ✅ Correct: 4-space indent under schedule push: branches: [main] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: npm test ```
Why: YAML is whitespace-sensitive. The - cron: line must indent 4 spaces from schedule:. Use a YAML validator to catch this before pushing.
---
Problem 3: Workflow File on Wrong Branch
BROKEN: ```
You committed .github/workflows/deploy.yml to feature branch
But GitHub Actions only reads from default branch (main/master)
git checkout -b feature/add-schedule... commit workflow file to feature branch ❌
```FIXED: ```bash
Ensure workflow file is on default branch
git checkout main echo 'on:\n schedule:\n - cron: "0 2 * * *"' >> .github/workflows/deploy.yml git add .github/workflows/deploy.yml git commit -m "Add scheduled workflow" git push origin main # ✅ Push to default branch ```Note: I'm uncertain whether workflows committed to non-default branches trigger immediately if you later merge—test this behavior in your version (as of 2026, this requires the workflow on default branch at trigger time).
---
Still Broken? Check These Too
1. Repository is archived or disabled → Check Settings > General; un-archive or enable Actions
2. Workflow uses environment variable in cron → GitHub doesn't support dynamic cron; use workflow_dispatch + cron scheduler service instead (see [GitHub Actions context limitations](/?guide=env-vars-workflows))
3. Runner labels don't exist → If using runs-on: [self-hosted, custom-label], that label must exist in Actions > Runners; use ubuntu-latest to test
---
Related Troubleshooting
---
Validation Checklist
yamllint .github/workflows/*.yml)---
Official Resources
📖 [GitHub Actions: Scheduled workflows docs](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule)
🛠️ [Cron syntax reference](https://crontab.guru) (non-GitHub; useful for validation)
---
Found a different variation? Drop it in the comments—we're tracking 2026 behavior changes.