GitHub Actions: scheduled workflow not triggering [2026 fix]

CRON syntax errors or `push` branch filters block scheduled runs; fix: validate cron expression and remove branch filters from schedule trigger.

GitHub Actions: Scheduled Workflow Not Triggering at 2AM

TL;DR

Cause: Your schedule trigger has invalid CRON syntax OR a branches filter is blocking execution. Fix: Validate CRON at [crontab.guru](https://crontab.guru) and remove branch filters from the on: schedule block.

---

Real Console Error Messages

You won't see these in GitHub Actions logs directly—they appear when you check workflow syntax:

``` Error: The workflow is not valid. .github/workflows/deploy.yml: Invalid cron syntax in scheduled event ```

``` Warning: The workflow file must have at least one event trigger configured ```

``` Error: Branch filter 'main' cannot be used with 'schedule' event Line 3, Col 5: Unexpected property 'branches' in schedule trigger ```

``` Debug: Event 'schedule' triggered 0 times in the past 30 days (Check: Repo had no activity matching this schedule) ```

``` Error: Workflow disabled. This workflow has had no executions in the last 60 days. Please push a commit or manually enable the workflow file. ```

---

Broken Code vs. Exact Fix

Issue #1: Invalid CRON Expression

BROKEN: ```yaml name: Deploy App on: schedule: - cron: '0 2 * * *' # WRONG: missing 5th field (day of week) jobs: deploy: runs-on: ubuntu-latest ```

FIXED: ```yaml name: Deploy App on: schedule: - cron: '0 2 * * *' # Correct: 5 fields (minute hour day month dow) # Runs at 2:00 AM UTC every day jobs: deploy: runs-on: ubuntu-latest ```

Why: CRON format in GitHub Actions requires exactly 5 fields: minute hour day month day-of-week. Missing or extra fields silently fail.

---

Issue #2: Branch Filter on Schedule Trigger

BROKEN: ```yaml on: schedule: - cron: '0 2 * * *' branches: - main # WRONG: branches filters don't work with schedule jobs: deploy: runs-on: ubuntu-latest ```

FIXED: ```yaml on: schedule: - cron: '0 2 * * *' # Remove 'branches' entirely—schedule events always run on default branch jobs: deploy: runs-on: ubuntu-latest exec: - name: Only deploy if on main branch if: github.ref == 'refs/heads/main' # Use 'if' instead ```

Why: The schedule trigger ignores branch filters. If you need conditional logic, use if: conditions inside jobs.

---

Issue #3: Timezone Mismatch (UTC Only)

BROKEN: ```yaml on: schedule: - cron: '0 2 * * *' # Assumes 2 AM in YOUR timezone ```

FIXED: ```yaml on: schedule: - cron: '0 6 * * *' # Adjusted to 6 AM UTC (= 2 AM EST)

GitHub Actions cron always uses UTC, regardless of repo timezone

jobs: deploy: runs-on: ubuntu-latest ```

Why: GitHub Actions interprets cron times in UTC only. If you need 2 AM EST, calculate: 2 AM EST = 7 AM UTC (winter) or 6 AM UTC (summer). Use the UTC value.

---

Verification Checklist

1. Test CRON syntax at [crontab.guru](https://crontab.guru) Paste 0 2 * * * and confirm it shows "At 00:02"—if not, your syntax is wrong.

2. Check workflow file format: ```bash # Validate locally (requires GitHub CLI) gh workflow view .github/workflows/deploy.yml --yaml ```

3. View workflow run history: Go to your repo → Actions tab → Click the workflow name → Check "All runs" If none exist in the past 60 days, GitHub may have auto-disabled it.

4. Re-enable if disabled: Actions tab → Click workflow → Click "Enable workflow" button (if shown).

5. Confirm repo hasn't been archived (archived repos don't run scheduled workflows).

---

Still broken? Check these too

1. [GitHub Actions: Workflow Disabled After 60 Days Inactivity](/?guide=github-actions-disabled) — If no runs executed in 2 months, GitHub auto-disables scheduled workflows. Fix: manually trigger one run or push a commit.

2. [Environment Variables Not Expanding in YAML](/?guide=github-actions-env-vars) — Ensure you're not using ${{ env.* }} inside the cron field; it won't interpolate there.

3. Runner Time Skew — Rare, but if your runner's clock is drastically off from UTC, scheduled jobs may not trigger. Check runner time: add a step - run: date -u.

---

Official References

  • [GitHub Actions: Events that trigger workflows — schedule](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule)
  • [CRON expression syntax documentation](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule)
  • ---

    Found a different variation? Drop it in the comments — If your scheduled workflow is still not triggering and the above doesn't match your error, please share your workflow YAML (redact secrets) and the exact error message. Community fixes welcome.

    🔥 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