GitHub Actions: scheduled workflow not triggering [2026 fix]
Scheduled workflows fail due to cron syntax errors, disabled workflows, or branch protection rules. Verify cron format, enable workflow, and check branch settings.
GitHub Actions: Scheduled Workflow Not Triggering – Emergency Fix
TL;DR
Cause: Your workflow is disabled, has invalid cron syntax, or the default branch doesn't contain the.github/workflows/ file.
Fix: Re-enable the workflow in GitHub UI, validate cron with crontab.guru, and ensure the workflow file exists on your default branch.---
Exact Error Messages
Error 1: Workflow Disabled (Silent Failure)
``` No logs appear. Workflow doesn't run at scheduled time. Check: Settings > Actions > General > "Disable all workflows" ```Error 2: Invalid Cron Syntax
``` [workflow-name] (push) Invalid workflow file detected Error: The workflow is not valid. .github/workflows/schedule.yml (Line 5, Col 3): Unexpected value 'on' ```Error 3: Cron Parsing Failure
``` schedule: '0 2 * * *' is not a valid cron expression Error in workflow file .github/workflows/deploy.yml at line 7 ```Error 4: File Not On Default Branch
``` Workflow file not found in repository The workflow file .github/workflows/scheduled-task.yml does not exist on the default branch (main) ```Error 5: Branch Protection Prevents Workflow Execution
``` Workflow blocked by branch protection rules Scheduled workflows cannot run on protected branches without explicit permissions ```---
Broken Code → Fixed Code
Problem 1: Syntax Error in Schedule Block
BROKEN: ```yaml name: Scheduled Deploy on: schedule - cron: '0 2 * * *'
jobs: deploy: runs-on: ubuntu-latest steps: - run: echo "Deploying" ```
FIXED: ```yaml name: Scheduled Deploy on: schedule: - cron: '0 2 * * *'
jobs: deploy: runs-on: ubuntu-latest steps: - run: echo "Deploying" ```
Issue: Missing colon after schedule. YAML requires key: format.
---
Problem 2: Invalid Cron Expression
BROKEN: ```yaml on: schedule: - cron: '*/5 * * *' # Missing field – only 4 fields instead of 5 ```
FIXED: ```yaml on: schedule: - cron: '*/5 * * * *' # Correct: minute hour day month weekday ```
Issue: GitHub Actions cron requires 5 fields: minute hour day month weekday. Your expression had only 4.
---
Problem 3: Timezone Issues (Implicit UTC)
BROKEN: ```yaml on: schedule: - cron: '0 2 * * *' # Assumes UTC, runs at 2 AM UTC regardless of your timezone ```
FIXED: ```yaml env: TZ: America/New_York
on: schedule: - cron: '0 2 * * *' # Now runs at 2 AM EST/EDT
jobs: deploy: runs-on: ubuntu-latest steps: - run: echo "Current time: $(date)" ```
Issue: GitHub Actions always interprets cron as UTC. Set TZ environment variable if you need a different timezone. Note: We cannot confirm if TZ env var affects the *schedule trigger itself* vs. just the job environment in all GitHub versions—verify this works for your version.
---
Verification Checklist
1. Validate cron syntax: Use [crontab.guru](https://crontab.guru) and enter 0 2 * * * to confirm timing (shows: "At 02:00 on every day-of-week")
2. Enable workflow: Go to your repo → Actions tab → Find your workflow → Click Enable workflow (if grayed out)
3. Check file location: Workflow MUST be in .github/workflows/ on your default branch (usually main)
4. Review branch protection: Settings → Branches → Check if default branch has rules blocking workflow execution
5. Verify commit is pushed: Workflow files must be committed and pushed; local-only changes won't trigger
---
Still Broken? Check These Too
Issue A: Workflow File Syntax Invalid (YAML Parser Error)
.yml file through [yamllint.com](https://yamllint.com)Issue B: if Condition Preventing Execution
```yaml
on:
schedule:
- cron: '0 2 * * *'jobs:
deploy:
if: github.event_name == 'push' # ← BUG: Blocks scheduled runs!
```
Scheduled workflows have github.event_name == 'schedule', not 'push'. See: [GitHub workflow syntax reference](/?guide=workflow-conditionals)
Issue C: Multiple Cron Entries Malformed
```yamlBROKEN
on: schedule: - cron: '0 2 * * *' - cron: '0 14 * * *' # Indentation off, causes parse failureFIXED
on: schedule: - cron: '0 2 * * *' - cron: '0 14 * * *' ```---
Official Resources
---
Found a different variation? Drop it in the comments.