GitHub Actions: scheduled workflow not triggering [2026 fix]

Scheduled workflows fail silently when cron syntax is invalid or workflow file isn't on default branch. Fix: validate cron with crontab.guru and ensure .github/workflows/ is committed to main/master.

GitHub Actions: Scheduled Workflow Not Triggering — 2am Emergency Fix

TL;DR

Cause: Your cron syntax is invalid OR the workflow file exists only on a non-default branch. Fix: Validate cron at [crontab.guru](https://crontab.guru) and ensure .github/workflows/*.yml is committed and pushed to your default branch (main/master).

---

Real Console Error Messages

GitHub Actions doesn't always surface scheduling errors visibly. Here's what you'll find:

```

Error 1: In workflow run logs (if manually triggered, but scheduled trigger absent)

No scheduled workflow runs in "Actions" tab → check file syntax

Error 2: In git push output or Actions tab

"This workflow has a syntax error in its cron expression"

Error 3: GitHub API response (via gh CLI)

{"message":"Problems parsing YAML at line 8: while parsing a block mapping"}

Error 4: Silent failure (most common)

[No error shown] Workflow scheduled but never executes; "Actions" tab shows 0 runs

Error 5: Branch protection issue

"Scheduled workflows can only run on the repository's default branch" ```

---

Broken vs. Fixed Code

❌ BROKEN: Invalid Cron Syntax

```yaml

.github/workflows/deploy.yml

name: Deploy on: schedule: - cron: '0 2 * * *' # ← BROKEN: ambiguous timezone, missing TZ context

jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: npm run deploy ```

Problem: GitHub Actions cron runs in UTC by default. If you intended 2am EST, this won't work as expected, and the YAML *may* parse but cause unexpected behavior.

✅ FIXED: Valid Cron + Explicit Timezone

```yaml

.github/workflows/deploy.yml

name: Deploy env: TZ: America/New_York # Explicit timezone for scripts on: schedule: - cron: '0 7 * * *' # Runs at 7am UTC = 2am EST (in winter) jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: npm run deploy ```

Why it works:

  • Cron '0 7 * * *' is valid (minute hour day month weekday)
  • GitHub Actions always interprets cron in UTC
  • EST offset: 2am EST = 7am UTC (during standard time)
  • TZ env var doesn't change cron execution time but helps scripts that parse timestamps
  • ---

    ❌ BROKEN: File on Wrong Branch

    ```

    Repository structure

    main/ ├─ src/ └─ README.md

    feature-branch/ └─ .github/workflows/deploy.yml ← Only here; main doesn't have it ```

    ✅ FIXED: Workflow File on Default Branch

    ```bash

    Ensure file is on main/master

    git checkout main git add .github/workflows/deploy.yml git commit -m "Add scheduled deployment workflow" git push origin main ```

    Then verify in GitHub UI: Actions → Scheduled shows your workflow.

    ---

    Common Cron Pitfalls

    | Intent | Cron | UTC Note | |--------|------|----------| | Every day 2am EST | 0 7 * * * | 7am UTC (winter only; use 6am for EDT) | | Every Monday 9am UTC | 0 9 * * 1 | Correct | | Every 6 hours | 0 */6 * * * | Runs at 0:00, 6:00, 12:00, 18:00 UTC | | Every 30 mins | */30 * * * * | ⚠️ Check version note below |

    Version Note: GitHub Actions [has historically had limits](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule) on minimum frequency for free-tier accounts. As of 2026, the official documentation states scheduled workflows run on-schedule if the repository has had activity in the past 60 days. Verify your repo isn't inactive.

    ---

    Verification Checklist

    1. Validate cron: Paste your expression at [crontab.guru](https://crontab.guru) 2. Check default branch: Settings → General → Default branch (confirm it's where your workflow lives) 3. Verify YAML syntax: Copy your .yml file content into a YAML validator 4. Push to remote: git log main -- .github/workflows/ should show your commits 5. Check Actions tab: Go to your repo → Actions → scroll to "Scheduled workflows" section 6. Re-run syntax check: Sometimes GitHub caches old data; re-save the workflow file to trigger re-validation

    ---

    Still Broken? Check These Too

    1. Workflow permissions: Settings → Actions → General → Workflow permissions must allow read and write. If set to read-only, scheduled jobs won't execute write operations. [GitHub Actions permissions guide](/?guide=actions-permissions)

    2. Inactivity timeout: Your repository must have had a push/PR/issue in the last 60 days for scheduled workflows to trigger. If you're testing a long-dormant repo, make a dummy commit to reset the timer.

    3. Conflicting event triggers: If your workflow also has on: [push, pull_request], the schedule trigger still works independently—but syntax errors in *any* trigger block will prevent the file from loading. Check all on: keys. [Related: push event troubleshooting](/?guide=github-actions-push-trigger)

    ---

    Official References

  • [GitHub Actions: Scheduled Events](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule)
  • [Crontab Syntax (External)](https://crontab.guru)
  • [GitHub Actions Workflow Syntax](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on)
  • ---

    Found a different variation? Drop it in the comments

    Scheduled workflows have edge cases—if you hit a scenario not covered here (e.g., organizational-level repos, enterprise runners, or region-specific behavior), please comment below. Common variations: daylight savings offsets, workflow_dispatch + schedule conflicts, and matrix jobs with scheduling.

    🔥 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