GitHub Actions: scheduled workflow not triggering [2026 fix]
Scheduled workflows fail silently when cron syntax is invalid or branch protection rules block execution. Fix: validate cron format and ensure default branch is set in repository settings.
GitHub Actions: Scheduled Workflow Not Triggering at 2am
TL;DR
Cause: Your cron expression syntax is invalid, or the workflow file isn't on your default branch. Fix: Validate cron syntax usingcrontab.guru and confirm your .github/workflows/ file is committed to main/master.---
Real Console Error Messages
When scheduled workflows fail, you won't see obvious errors in GitHub Actions UI. Instead, look for these:
``` Error: The schedule event is not available on this repository. Scheduled runs are disabled for this repository. ```
``` Error: Invalid cron syntax in workflow file. Branch 'develop' is not the default branch—scheduled runs only trigger on default branch. ```
``` no jobs ran This scheduled event did not trigger any workflow runs. ```
``` Error: Workflow file not found at refs/heads/main/.github/workflows/deploy.yml Make sure the workflow YAML is committed to your default branch. ```
``` ERROR: Cron expression '0 2 * * *' is ambiguous or malformed. GitHub Actions expects standard Unix cron format: minute hour day month weekday. ```
---
Broken Code vs. Fixed Code
Issue 1: Invalid Cron Syntax
BROKEN: ```yaml
.github/workflows/scheduled-deploy.yml
name: Deployon: schedule: - cron: '2 * * * *' # ❌ Missing hour value—interpreted as 2 minutes past every hour - cron: '0 2 * * * *' # ❌ Six fields (cron syntax has 5 fields)
jobs: deploy: runs-on: ubuntu-latest steps: - run: echo "Deploying..." ```
FIXED: ```yaml
.github/workflows/scheduled-deploy.yml
name: Deployon: schedule: - cron: '0 2 * * *' # ✅ Runs at 02:00 UTC every day (minute hour day month weekday) - cron: '0 9 * * MON' # ✅ Runs at 09:00 UTC every Monday
jobs: deploy: runs-on: ubuntu-latest steps: - run: echo "Deploying..." ```
Cron Field Reference:
Issue 2: Workflow File on Wrong Branch
BROKEN: ```yaml
Workflow committed to 'develop' branch, but GitHub Actions only runs scheduled jobs from default branch
.github/workflows/scheduled-deploy.yml exists in 'develop' but NOT in 'main'
```FIXED: ```bash
Ensure workflow file exists on your default branch
git checkout main git pull origin main ls -la .github/workflows/scheduled-deploy.yml # ✅ File must exist hereCommit the workflow to main
git add .github/workflows/scheduled-deploy.yml git commit -m "Add scheduled workflow" git push origin main ```Then verify in GitHub UI: Settings → Default branch should show main (or your actual default).
Issue 3: Repository Settings Disable Scheduled Workflows
BROKEN: ``` GitHub UI shows:
FIXED: ``` GitHub UI: 1. Go to Settings → Actions → General 2. Under "Actions permissions" select: "Allow all actions and reusable workflows" 3. Click Save 4. Go to Settings → Actions → Runners (if using self-hosted) - Ensure at least one runner is online for scheduled jobs ```
---
Still Broken? Check These Too
1. UTC Timezone Confusion: GitHub Actions interprets all cron expressions in UTC. If you scheduled 0 2 * * * expecting 2am in your local timezone, it's running 2am UTC instead. Use an online [cron time converter](https://crontab.guru/) to verify your desired time.
2. Missing permissions Block: Some organizations require explicit workflow permissions. Add this to your workflow:
```yaml
permissions:
contents: read
actions: read
```
Reference: [GitHub Actions permissions guide](/?guide=actions-permissions)
3. Workflow Disabled in UI: GitHub UI has a toggle to disable individual workflows. Go to Actions tab → Your Workflow → Three dots menu → Enable workflow if it shows "Disabled".
---
Validation Checklist
.github/workflows/yourfile.yml) committed to default branch---
Related Guides
runs-on](/?guide=github-actions-runs-on)---
Official Documentation
[GitHub Actions Scheduled Workflows – Official Docs](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule)
---
Found a different variation? Drop it in the comments—mention your GitHub Actions runner version and workflow trigger type.