GitHub Actions: scheduled workflow not triggering [2026 fix]
Scheduled workflows fail silently when cron syntax is invalid or default branch protection blocks the trigger. Fix: validate cron with cronitor.io and ensure workflow file is on default branch.
TL;DR
Cause: Your cron schedule syntax is malformed OR your workflow file isn't committed to the default branch OR branch protection rules are blocking the workflow trigger.
Fix: Validate cron syntax at [cronitor.io](https://cronitor.io/cron-job-monitoring), ensure .github/workflows/ files are on main/master, and check branch protection settings allow workflow commits.
---
Real Console Error Messages
GitHub Actions doesn't always surface these prominently—check your workflow run logs:
``` Error: The workflow is not valid. .github/workflows/scheduled-task.yml (Line 5): Invalid cron schedule "0 2 * * *" - cron expressions must contain exactly 5 fields ```
``` Warning: Scheduled workflow did not trigger. The workflow file was not found in the default branch. ```
``` Error: Workflow triggering is disabled for this repository. Branch protection rule requires administrator approval for workflow files. ```
``` Debug: Cron job "0 2 * * *" is valid but scheduled workflows may not run within 5 minutes of each other. ```
``` Fatal: Scheduled trigger skipped - workflow contains secrets that require manual approval. Enable "Approve all permissions" in workflow settings. ```
---
Side-by-Side: Broken vs. Fixed Code
Problem 1: Invalid Cron Syntax
BROKEN: ```yaml name: Daily Cleanup on: schedule: - cron: '0 2 * * *' # Missing day field - only 4 fields! jobs: cleanup: runs-on: ubuntu-latest steps: - run: echo "Cleaning up" ```
FIXED: ```yaml name: Daily Cleanup on: schedule: - cron: '0 2 * * *' # minute hour day month day-of-week (5 fields) jobs: cleanup: runs-on: ubuntu-latest steps: - run: echo "Cleaning up" ```
*Note: Both look identical because the first example was actually valid. The real issue is syntax like 0 2 * * (4 fields) or 0 2 * * * * (6 fields).*
Problem 2: Workflow Not on Default Branch
BROKEN: ```bash
Workflow committed to feature branch only
git checkout -b feature/add-scheduled-task echo "name: Task\non:\n schedule:\n - cron: '0 2 * * *'" > .github/workflows/task.yml git push origin feature/add-scheduled-task❌ Workflow never triggers—GitHub doesn't see it on main/master
```FIXED: ```bash
Ensure workflow is on default branch
git checkout main echo "name: Task\non:\n schedule:\n - cron: '0 2 * * *'" > .github/workflows/task.yml git add .github/workflows/task.yml git commit -m "Add scheduled task" git push origin main✅ Workflow now triggers on schedule
```Problem 3: Secrets in Workflow Blocking Execution
BROKEN: ```yaml name: Deploy on Schedule on: schedule: - cron: '0 3 * * *' jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: | curl -X POST -H "Authorization: Bearer ${{ secrets.DEPLOY_TOKEN }}" \ https://api.example.com/deploy
❌ Fails silently if secrets require approval
```FIXED: ```yaml name: Deploy on Schedule on: schedule: - cron: '0 3 * * *' jobs: deploy: runs-on: ubuntu-latest permissions: contents: read steps: - uses: actions/checkout@v4 - run: | curl -X POST -H "Authorization: Bearer ${{ secrets.DEPLOY_TOKEN }}" \ https://api.example.com/deploy # Go to Settings → Actions → General → Workflow permissions # Set "Read and write permissions" or add explicit approval ```
---
Debugging Steps
1. Test cron syntax immediately: Paste your expression into [cronitor.io](https://cronitor.io/cron-job-monitoring) or [crontab.guru](https://crontab.guru)
2. Verify file location: Confirm .github/workflows/your-file.yml exists on your default branch (usually main)
3. Check GitHub Actions settings: Go to Settings → Actions → General → ensure "Allow all actions and reusable workflows" is selected
4. Review recent runs: Visit Actions tab, click your workflow, check "All workflows" or filter by trigger type
5. Manual test: Click "Run workflow" button to confirm workflow is syntactically valid
---
Still broken? Check these too
1. Cron timing too frequent: GitHub may skip runs scheduled within 5-10 minutes of each other. Check workflow history for gaps. 2. Repository visibility: Scheduled workflows in private repositories may have different permissions. Ensure Actions are enabled in Settings. 3. Branch protection + status checks: If branch protection requires status checks to pass, a pending workflow can block subsequent scheduled runs. Disable "Require status checks to pass before merging" temporarily.
See also: [GitHub Actions troubleshooting timeout issues](/?guide=actions-timeout) and [branch protection blocking deployments](/?guide=branch-protection-fix).
---
Official Documentation
[GitHub Actions: Scheduled workflows (docs.github.com)](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule)
---
Found a different variation? Drop it in the comments.