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)

  • Run your .yml file through [yamllint.com](https://yamllint.com)
  • Check for tabs instead of spaces (YAML requires spaces)
  • See: [GitHub Actions troubleshooting guide](/?guide=github-actions-errors)
  • 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

    ```yaml

    BROKEN

    on: schedule: - cron: '0 2 * * *' - cron: '0 14 * * *' # Indentation off, causes parse failure

    FIXED

    on: schedule: - cron: '0 2 * * *' - cron: '0 14 * * *' ```

    ---

    Official Resources

  • [GitHub Actions: Workflow syntax for scheduled events](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule)
  • [Crontab guru: Test cron expressions](https://crontab.guru)
  • [GitHub Actions troubleshooting](https://docs.github.com/en/actions/troubleshooting)
  • ---

    Found a different variation? Drop it in the comments.

    🔥 0d
    LIVE
    ↓ PlanetScale rage spiking •⚠ Vercel pricing complaints •↑ Railway gaining fast •↑ Supabase happiness rising •↑ Resend loved by devs •↓ PlanetScale rage spiking •⚠ Vercel pricing complaints •↑ Railway gaining fast •↑ Supabase happiness rising
    DEVELOPER PAIN RADAR // Loading...

    Developers complain.
    Opportunities appear.

    We track what developers are struggling with today — and what opportunities that creates.

    —
    guides today
    —
    avg happiness
    🔥 Pain
    📖 Guides
    🔭 Explore
    👤 Mine
    🔥 Pain Radar — rage scores today
    ↗ share
    💡 Opportunity Feed — pain = market gap
    📈 Tool Momentum
    all scores →
    📖 Latest Guide
    all guides →
    📖 All Guides
    📊 Tool Scores
    + Submit
    📰 Hacker News
    ➕ Submit a Tool
    ← back