GitHub Actions: scheduled workflow not triggering [2026 fix]
Scheduled workflows need `on.schedule` syntax with valid cron + repo must have Actions enabled. Enable Actions tab and fix YAML cron format.
GitHub Actions: Scheduled Workflow Not Triggering at 2am
TL;DR
Cause: Your cron syntax is invalid OR GitHub Actions is disabled on the repository OR the branch doesn't exist. Fix: Validate cron format at crontab.guru, enable Actions in repo settings, ensure.github/workflows/ is on your default branch.---
Common Error Messages
Here are EXACT console outputs you'll see:
``` Error: Cron expression is invalid ERROR: "0 2 * * *" is not a valid cron expression ```
``` Warning: This workflow will not run Scheduled workflows are disabled for this repository ```
``` [workflow_run] No runs triggered for push to main Scheduled events are not supported for this ref ```
```
Error in workflow YAML
Syntax error near line 4: schedule: requires cron property
```
``` No matching workflow runs found Workflow file not found at .github/workflows/schedule.yml on branch main ```
---
Broken Code vs. Exact Fix
Issue #1: Invalid Cron Syntax
BROKEN: ```yaml name: Deploy on: schedule: - cron: '2 0 * * *' # This runs at 2:00 UTC but often fails parsing ```
FIXED: ```yaml name: Deploy on: schedule: - cron: '0 2 * * *' # Correct: hour 2 (2am UTC), minute 0 ```
Why: GitHub Actions uses UTC 24-hour format. 0 2 * * * = 2:00 AM UTC daily. The order is: minute hour day month weekday. Test yours at [crontab.guru](https://crontab.guru).
Issue #2: Actions Disabled on Repository
BROKEN: ``` → Repo settings show "Actions" tab is grayed out → Workflow file exists but never runs ```
FIXED: 1. Go to your repo → Settings → Actions → General 2. Under "Actions permissions," select "Allow all actions and reusable workflows" 3. Scroll to "Workflow permissions" → Enable "Read and write permissions" 4. Click Save
Issue #3: Workflow File on Wrong Branch
BROKEN: ```yaml
File: .github/workflows/schedule.yml on branch develop
But repo default branch is main
Result: Workflow never triggers
```FIXED: ```bash
Ensure workflow file exists on DEFAULT branch:
git checkout main # or your default branch git pull origin main ls -la .github/workflows/schedule.yml git add .github/workflows/schedule.yml git commit -m "Add scheduled workflow" git push origin main ```Why: GitHub Actions only reads workflows from your repository's default branch. If your YAML is on develop and default is main, it won't run.
Issue #4: Missing Repository Push Permission
BROKEN: ```yaml jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: echo "This runs" | tee output.txt # Works - run: git push origin main # FAILS - no credentials ```
FIXED: ```yaml jobs: deploy: runs-on: ubuntu-latest permissions: contents: write # Add explicit permission steps: - uses: actions/checkout@v4 with: token: ${{ secrets.GITHUB_TOKEN }} - run: echo "This runs" | tee output.txt - run: git push origin main # Now works ```
---
Verification Checklist
Before declaring victory:
✅ Run crontab.guru validation on your cron string
✅ Confirm workflow file is .github/workflows/*.yml (exact path)
✅ Verify file is committed to default branch (usually main)
✅ Check Settings → Actions → General is enabled
✅ Look at workflow run history (Actions tab) for last execution time
✅ GitHub uses UTC timezone — adjust your cron accordingly
---
Still Broken? Check These Too
1. Workflow file syntax errors: Paste your .yml at [yamllint.com](https://www.yamllint.com). YAML is whitespace-sensitive; one misaligned space breaks everything. I'm uncertain whether GitHub's parser catches all YAML v1.2 edge cases—test locally with yamllint .github/workflows/*.yml.
2. Pull Request vs. Push trigger: If your workflow has on: [pull_request] instead of on: schedule, it won't run on a timer. Verify your on: block contains schedule: with valid cron. See [GitHub Actions events](/?guide=github-actions-events) for all trigger types.
3. GitHub Enterprise or Organization restrictions: If your repo is in a GitHub Enterprise instance or organization, check Organization → Settings → Actions → Runner groups. Some orgs disable scheduled workflows by policy. Also verify the workflow hasn't been disabled via the UI (Actions tab shows a disabled icon).
---
Debug: Manual Trigger Test
To confirm your workflow *syntax* is correct before waiting for the next cron execution:
```yaml name: Deploy on: schedule: - cron: '0 2 * * *' workflow_dispatch: # Add this for manual testing
jobs: deploy: runs-on: ubuntu-latest steps: - run: echo "Workflow triggered successfully" ```
Go to Actions tab → select this workflow → click Run workflow → Run workflow. If it succeeds here, your syntax is valid. If it fails, you have a runtime issue unrelated to scheduling.
---
Official Resources
Found a different variation? Drop it in the comments—we'll add it to this guide.