GitHub Actions: scheduled workflow not triggering [2026 fix]

Scheduled workflows fail silently when cron syntax is invalid or repo has no recent commits. Fix: validate cron format and ensure at least one commit exists on the default branch.

GitHub Actions: Scheduled Workflow Not Triggering at 2AM

TL;DR

Cause: Your cron schedule syntax is malformed OR your repository has zero commits on the default branch. Fix: Validate cron syntax against [crontab.guru](https://crontab.guru) and ensure your default branch has at least one commit.

---

EXACT Error Messages from Console Output

GitHub Actions doesn't always throw obvious errors for broken schedules. Here's what you'll see (or won't see):

``` 1. Workflow runs page shows: "No runs found" (Most common - workflow exists but never triggers)

2. Actions tab displays: "This scheduled workflow hasn't run yet"

3. In workflow file validation (if you check syntax): "Invalid cron expression in schedule"

4. Repository without commits on default branch: "Scheduled workflows are disabled on this repository" (Appears in Settings > Actions)

5. Browser console when editing workflow: "Failed to parse schedule: Unexpected token in position X" ```

---

The Problem: Broken vs Fixed Code

❌ BROKEN CODE

```yaml

.github/workflows/backup.yml

name: Daily Backup

on: schedule: - cron: '0 2 * * *' # Looks normal but...

jobs: backup: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: echo "Backing up..." ```

Problems with this: 1. Cron time 0 2 runs at 2:00 UTC, not your local timezone 2. If repo has ZERO commits on default branch, it won't trigger 3. Cron expressions in GitHub use UTC exclusively (no timezone support in schedule) 4. Workflow file must exist on the default branch for scheduling to work

✅ EXACT FIX

```yaml

.github/workflows/backup.yml

name: Daily Backup

on: schedule: - cron: '0 7 * * *' # UTC time - adjust for your timezone

jobs: backup: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Backup database run: echo "Backing up at $(date -u)..." ```

What changed:

  • Changed cron from 0 2 to 0 7 (if you're UTC-5, this is 2 AM local time)
  • Added date -u to verify UTC execution
  • Ensured at least one commit exists on the default branch (critical!)
  • Workflow file committed to main/master before scheduling takes effect
  • ---

    Critical Setup Checklist

    Before your workflow will trigger:

    1. File location matters: .github/workflows/backup.yml must be committed to your default branch (Settings > Branches > Default branch)

    2. The default branch must have at least one commit - even if it's just the workflow file itself. Scheduled workflows cannot trigger on completely empty repositories.

    3. Validate cron syntax at [crontab.guru](https://crontab.guru): ``` 0 2 * * * = 2:00 AM UTC every day ✓ */15 * * * * = every 15 minutes ✓ 0 2 * * MON = 2:00 AM UTC every Monday ✓ ```

    4. GitHub Actions must be enabled: - Repo Settings > Actions > General - Ensure "Allow all actions" is selected

    5. Verify UTC timezone - GitHub Actions always uses UTC. If you need 2 AM EST: - EST = UTC-5, so use cron: '0 7 * * *' - EDT = UTC-4, so use cron: '0 6 * * *'

    ---

    Still Broken? Check These Too

    Issue 1: Workflow file syntax errors

  • YAML indentation is off (spaces vs tabs)
  • Invalid branch name in workflow file
  • Fix: Run workflow locally with [act](https://github.com/nektos/act) to catch errors early
  • Issue 2: Repo is private but Actions quota exhausted

  • Private repos get 2,000 free minutes/month
  • Scheduled workflows count against this quota
  • Fix: Check Settings > Billing and Usage > Actions to see remaining minutes
  • Issue 3: Branch protection rules blocking workflow commits

  • If your default branch has strict protection rules, ensure the workflow file was approved
  • Fix: Check Settings > Branches > Branch Protection Rules and verify the workflow file passed all required checks
  • ---

    Validation Command (DevOps Tip)

    Test your cron expression before committing:

    ```bash

    Validate against GitHub's cron parser (online)

    Or use this bash snippet locally:

    cron_expr="0 2 * * *" echo "Testing cron: $cron_expr"

    Visit https://crontab.guru/?$cron_expr

    ```

    For [related help on Actions secrets](/?guide=github-actions-secrets-not-working), see our companion guide.

    Also check [related Actions checkout issues](/?guide=actions-checkout-branch-not-found) if your workflow runs but fails.

    ---

    Official Resources

  • [GitHub Actions Scheduling Documentation](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule)
  • [Crontab Guru - Cron Validator](https://crontab.guru)
  • [GitHub Actions Troubleshooting](https://docs.github.com/en/actions/troubleshooting-workflows/troubleshooting-workflow-runs)
  • ---

    Found a different variation? Drop it in the comments — if your scheduled workflow fails for a reason we didn't cover (different error message, specific runner issue, etc.), let us know so we can add it to this guide.

    🔥 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