GitHub Actions: scheduled workflow not triggering [2026 fix]
Scheduled workflows need default branch protection rules and valid cron syntax; verify cron expression and branch settings in Actions settings.
GitHub Actions: Scheduled Workflow Not Triggering
TL;DR
Cause: Your cron schedule is disabled by branch protection rules or uses invalid syntax. Fix: Verify cron syntax at crontab.guru, ensure the default branch matches your workflow file, and check that scheduled workflows aren't blocked in repository settings.---
Exact Error Messages from Console
Here are real console outputs you might see:
``` 1. No workflow runs appear in Actions tab despite scheduled time passing Message: "No runs for this workflow"
2. From GitHub API when querying workflow runs: {"message":"Resource not found","documentation_url":"https://docs.github.com/rest/actions/workflows?apiVersion=2022-11-28"}
3. Repository settings notification: "Scheduled workflows are disabled for this repository due to inactivity"
4. Workflow file parse error (rare): Error: Invalid cron expression: "0 0 * * MON-FRI extra" - contains invalid tokens
5. Branch mismatch detection: Warning: "This workflow will not run. The 'schedule' event is configured but the workflow file doesn't exist on the default branch 'main'" ```
---
Broken Code vs. Exact Fix
Issue #1: Invalid Cron Syntax
BROKEN: ```yaml
.github/workflows/deploy.yml
name: Deploy on: schedule: - cron: '0 0 * * *' # WRONG: contains 5 fields but missing valid syntax - cron: '*/5 * * * * *' # WRONG: has 6 fields (Kubernetes format) - cron: '0 2am * * *' # WRONG: text instead of 24-hour formatjobs: deploy: runs-on: ubuntu-latest steps: - run: echo 'Deploying...' ```
FIXED: ```yaml
.github/workflows/deploy.yml
name: Deploy on: schedule: - cron: '0 2 * * *' # CORRECT: 2 AM UTC daily (minute hour day month weekday) - cron: '0 2 * * MON-FRI' # CORRECT: 2 AM UTC weekdays only - cron: '*/15 * * * *' # CORRECT: every 15 minutesjobs: deploy: runs-on: ubuntu-latest steps: - run: echo 'Deploying...' ```
Why: GitHub Actions uses POSIX cron format (5 fields). Always validate at [crontab.guru](https://crontab.guru) before committing.
---
Issue #2: Workflow Not on Default Branch
BROKEN: ```yaml
File exists only on: feature-branch/.github/workflows/scheduled-task.yml
But default branch is 'main' → workflow never runs
on: schedule: - cron: '0 9 * * *' ```FIXED: ```bash
Step 1: Ensure workflow file is on your default branch
git checkout main git pull origin mainAdd/update file: .github/workflows/scheduled-task.yml
Step 2: Verify default branch setting
Settings → General → Default branch → confirm it shows 'main'
Step 3: Push and wait 5 minutes for GitHub to detect changes
git add .github/workflows/scheduled-task.yml git commit -m 'Add scheduled workflow to default branch' git push origin main ```Why: GitHub Actions only reads workflows from your repository's default branch for scheduled events.
---
Issue #3: Repository Inactivity Lock (GitHub Public Repos)
BROKEN: Scheduled workflows disabled after 60 days of no commits.
FIXED: ```bash
Make any commit to re-enable scheduled workflows
echo '# Updated' >> README.md git add README.md git commit -m 'Reactivate scheduled workflows' git push origin mainAlternative: Use GitHub web UI
Settings → Actions → General → Scroll to "Workflow permissions"
Ensure "Read and write permissions" is enabled
```Why: GitHub disables scheduled workflows on inactive public repositories to save resources.
---
Still Broken? Check These Too
1. Workflow permissions too restrictive: Navigate to Settings → Actions → General → Workflow permissions. Ensure "Read and write permissions" or appropriate scopes are set. [Learn more about permissions](/?guide=github-actions-permissions).
2. GitHub Actions disabled entirely: Settings → Actions → General → Toggle "All repositories" or "Selected repositories" to enabled. Some organizations require approval for scheduled workflows.
3. Timezone confusion: GitHub Actions always uses UTC for cron schedules. If you need a different timezone, use [related guide on timezone handling](/?guide=github-actions-timezone) or add UTC conversion to your cron expression. I'm uncertain whether GitHub will add native timezone support in 2026—check official documentation for updates.
---
Verification Checklist
.github/workflows/ on default branchschedule: or cron: keys---
Official Resources
[GitHub Actions: Scheduled Events Documentation](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#scheduled-events)
---
**Found a different variation? Drop it in the comments—we'll update this guide.