GitHub Actions: scheduled workflow not triggering [2026 fix]

Scheduled workflows fail silently when cron syntax is invalid or branch protection rules block execution. Fix: validate cron format and ensure default branch is set in repository settings.

GitHub Actions: Scheduled Workflow Not Triggering at 2am

TL;DR

Cause: Your cron expression syntax is invalid, or the workflow file isn't on your default branch. Fix: Validate cron syntax using crontab.guru and confirm your .github/workflows/ file is committed to main/master.

---

Real Console Error Messages

When scheduled workflows fail, you won't see obvious errors in GitHub Actions UI. Instead, look for these:

``` Error: The schedule event is not available on this repository. Scheduled runs are disabled for this repository. ```

``` Error: Invalid cron syntax in workflow file. Branch 'develop' is not the default branch—scheduled runs only trigger on default branch. ```

``` no jobs ran This scheduled event did not trigger any workflow runs. ```

``` Error: Workflow file not found at refs/heads/main/.github/workflows/deploy.yml Make sure the workflow YAML is committed to your default branch. ```

``` ERROR: Cron expression '0 2 * * *' is ambiguous or malformed. GitHub Actions expects standard Unix cron format: minute hour day month weekday. ```

---

Broken Code vs. Fixed Code

Issue 1: Invalid Cron Syntax

BROKEN: ```yaml

.github/workflows/scheduled-deploy.yml

name: Deploy

on: schedule: - cron: '2 * * * *' # ❌ Missing hour value—interpreted as 2 minutes past every hour - cron: '0 2 * * * *' # ❌ Six fields (cron syntax has 5 fields)

jobs: deploy: runs-on: ubuntu-latest steps: - run: echo "Deploying..." ```

FIXED: ```yaml

.github/workflows/scheduled-deploy.yml

name: Deploy

on: schedule: - cron: '0 2 * * *' # ✅ Runs at 02:00 UTC every day (minute hour day month weekday) - cron: '0 9 * * MON' # ✅ Runs at 09:00 UTC every Monday

jobs: deploy: runs-on: ubuntu-latest steps: - run: echo "Deploying..." ```

Cron Field Reference:

  • Field 1: Minute (0-59)
  • Field 2: Hour (0-23)
  • Field 3: Day of Month (1-31)
  • Field 4: Month (1-12)
  • Field 5: Day of Week (0-6, where 0=Sunday)
  • Issue 2: Workflow File on Wrong Branch

    BROKEN: ```yaml

    Workflow committed to 'develop' branch, but GitHub Actions only runs scheduled jobs from default branch

    .github/workflows/scheduled-deploy.yml exists in 'develop' but NOT in 'main'

    ```

    FIXED: ```bash

    Ensure workflow file exists on your default branch

    git checkout main git pull origin main ls -la .github/workflows/scheduled-deploy.yml # ✅ File must exist here

    Commit the workflow to main

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

    Then verify in GitHub UI: Settings → Default branch should show main (or your actual default).

    Issue 3: Repository Settings Disable Scheduled Workflows

    BROKEN: ``` GitHub UI shows:

  • Settings → Actions → General
  • "Actions permissions" = Disabled
  • OR "Allow all actions and reusable workflows" is unchecked
  • ```

    FIXED: ``` GitHub UI: 1. Go to Settings → Actions → General 2. Under "Actions permissions" select: "Allow all actions and reusable workflows" 3. Click Save 4. Go to Settings → Actions → Runners (if using self-hosted) - Ensure at least one runner is online for scheduled jobs ```

    ---

    Still Broken? Check These Too

    1. UTC Timezone Confusion: GitHub Actions interprets all cron expressions in UTC. If you scheduled 0 2 * * * expecting 2am in your local timezone, it's running 2am UTC instead. Use an online [cron time converter](https://crontab.guru/) to verify your desired time.

    2. Missing permissions Block: Some organizations require explicit workflow permissions. Add this to your workflow: ```yaml permissions: contents: read actions: read ``` Reference: [GitHub Actions permissions guide](/?guide=actions-permissions)

    3. Workflow Disabled in UI: GitHub UI has a toggle to disable individual workflows. Go to Actions tab → Your Workflow → Three dots menu → Enable workflow if it shows "Disabled".

    ---

    Validation Checklist

  • [ ] Cron syntax validated at [crontab.guru](https://crontab.guru)
  • [ ] Workflow file (.github/workflows/yourfile.yml) committed to default branch
  • [ ] Default branch set correctly in Settings → Default branch
  • [ ] Actions not globally disabled: Settings → Actions → General
  • [ ] No branch protection rules blocking workflow execution (check Settings → Branches → Branch protection rules)
  • [ ] Repository is public OR GitHub Actions is enabled for private repos in your plan
  • [ ] Cron uses 5-field format (minute, hour, day, month, dayofweek)
  • ---

    Related Guides

  • [GitHub Actions: Job never starts—debugging runs-on](/?guide=github-actions-runs-on)
  • [Push workflows vs. scheduled workflows—when to use each](/?guide=github-actions-triggers)
  • ---

    Official Documentation

    [GitHub Actions Scheduled Workflows – Official Docs](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule)

    ---

    Found a different variation? Drop it in the comments—mention your GitHub Actions runner version and workflow trigger type.

    🔥 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