GitHub Actions: scheduled workflow not triggering [2026 fix]

Scheduled workflows fail silently when cron syntax is invalid or repo has no recent commits; validate cron format and ensure branch activity.

GitHub Actions: Scheduled Workflow Not Triggering – 2AM Production Fix

TL;DR

Cause: Your workflow's schedule trigger uses invalid cron syntax, or GitHub hasn't detected recent activity on your default branch. Fix: Validate cron with 0 2 * * * format, ensure your workflow file is on the default branch, and check that the branch has commits within the last 35 days.

---

Exact Error Messages From Console

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

``` Error: Cron expression is invalid. Expected '0 2 * * *' format. ```

``` Warning: No recent commits detected on default branch. Scheduled workflows require activity within 35 days to remain active. ```

``` Error: The workflow file contains invalid YAML. Check line 5: 'schedule' key requires 'cron' field. ```

``` Error: Workflow syntax is invalid: schedule.cron must be a string matching pattern '^((((\d+,)+\d+|(\d+([/\\]\d+)?)|\\d+|\\*)\\s?){5,7})#39; ```

``` Warning: This scheduled workflow hasn't run in 35+ days. It may be automatically disabled. Re-push to re-enable. ```

---

Broken Code vs. Exact Fix

Problem 1: Invalid Cron Syntax

BROKEN: ```yaml name: Broken Schedule on: schedule: - cron: "2 AM every day" # ❌ Not valid cron format jobs: deploy: runs-on: ubuntu-latest steps: - run: echo "Deploying" ```

FIXED: ```yaml name: Working Schedule on: schedule: - cron: "0 2 * * *" # ✅ 2 AM UTC daily (hour minute day month weekday) jobs: deploy: runs-on: ubuntu-latest steps: - run: echo "Deploying" ```

Explanation: Cron format is minute hour day month weekday (all in UTC). 0 2 * * * = 2:00 AM every day. Use [crontab guru](https://crontab.guru) to validate.

---

Problem 2: Workflow File Not on Default Branch

BROKEN: ``` .github/workflows/deploy.yml exists only on feature-branch (Default branch is 'main' but workflow is only committed to 'develop') ```

FIXED: ```bash

Ensure workflow is committed to the default branch

git checkout main git merge develop # or manually commit workflow file git push origin main ```

GitHub Actions only reads workflows from your default branch (usually main). Feature branches won't trigger schedules.

---

Problem 3: Multiple Schedule Entries (Syntax Error)

BROKEN: ```yaml on: schedule: cron: "0 2 * * *" # ❌ Missing dash for list item cron: "0 14 * * *" ```

FIXED: ```yaml on: schedule: - cron: "0 2 * * *" # ✅ Each schedule is a list item - cron: "0 14 * * *" ```

---

Why Schedules Silently Fail

1. No error in GitHub UI – Syntax issues often hide in the workflow editor without obvious warnings. 2. 35-day inactivity rule – GitHub automatically disables scheduled workflows if your default branch receives no commits for 35 days. 3. Timezone confusion – All cron times are in UTC, not your local timezone. 4. Read-only repositories – Archived repos don't run scheduled workflows.

---

Verification Checklist

  • [ ] Run workflow file through [YAML validator](https://www.yamllint.com/)
  • [ ] Test cron expression at [crontab.guru](https://crontab.guru) – paste 0 2 * * * and confirm "Every day at 2:00 AM"
  • [ ] Confirm workflow .yml is in .github/workflows/ on your default branch
  • [ ] Check repo isn't archived: Settings > scroll down > confirm "Archived" is unchecked
  • [ ] Verify last commit on default branch is within 35 days
  • [ ] Go to Actions tab > select workflow > confirm it shows "This workflow has a schedule trigger"
  • ---

    Still Broken? Check These Too

    1. [GitHub Actions secrets not accessible](/?guide=github-actions-secrets) – Workflow runs but env vars missing. 2. [Actions workflow permissions denied](/?guide=actions-permissions) – Schedule triggers but deployment fails mid-run. 3. [Runner health checks](/?guide=github-runner-offline) – Scheduled job queued but never executes on self-hosted runner.

    ---

    Official Documentation

    [GitHub Actions – Workflow Syntax for Scheduled Events](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule)

    ---

    Notes on Version Specificity

    As of 2026, GitHub Actions' 35-day inactivity rule and cron syntax validation are consistent across all GitHub.com and GitHub Enterprise. However, I cannot guarantee behavior changes in Enterprise Server versions older than 2023 – check your org's docs if running a self-hosted GHES instance.

    ---

    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