# GitHub Actions Scheduled Workflows Auto-Disabled After 60 Days of Repo Inactivity

> Why public GitHub repositories automatically suspend on.schedule cron workflows after 60 days without commits, and how to re-enable or prevent suspension.

- **Canonical URL**: https://opslint.dev/cron/github-actions-60-day-inactivity-scheduled-workflow-disabled/
- **Category**: `CRON`
- **Interactive Workbench**: [Open in Live Workbench](https://opslint.dev/cron/#expr=23%203%20*%20*%201&tz=UTC&dialect=github-actions)
- **Normative Specifications**: `GitHub Docs: Disabling and Enabling a Workflow (60-Day Inactivity Policy)`, `GitHub REST API: POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable`

## Incident Symptom & Root Cause

**Production Symptom**: A stable, hands-off scheduled GitHub Actions workflow (such as dependency vulnerability scanning, certificate renewal, link checking, or static feed rebuilds) stops running completely after two months without code changes, showing 'This scheduled workflow is disabled because there hasn't been activity in this repository for at least 60 days.'

**Protocol / Engine Root Cause**: To curb abandoned compute usage in public repositories, GitHub automatically disables all on.schedule triggers in any public repository once 60 consecutive days pass with zero commits or repository push activity (sending a warning email at day 53).

## Remediation Diff (Broken vs Verified Fix)

### Unmonitored Public Repo Cron Vulnerable to 60-Day Suspension

```text
# Public repo with zero commits for >60 days:
# GitHub marks workflow state = "disabled_inactivity" and stops all cron runs!
name: Nightly TLS & Link Audit
on:
  schedule:
    - cron: "0 3 * * *"
jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: ./scripts/check-endpoints.sh
```

### CLI Re-Enable + Verified Heartbeat / External Trigger Pattern

```text
# 1. Re-enable an already suspended workflow immediately via GitHub CLI:
gh workflow list --all
gh workflow enable "Nightly TLS & Link Audit"

# 2. Or trigger via GitHub REST API from an external scheduler (Cloudflare Worker / systemd)
# workflow_dispatch is NEVER auto-disabled by the 60-day public repo rule:
curl -X POST \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer ${GITHUB_PAT}" \
  https://api.github.com/repos/ORG/REPO/actions/workflows/audit.yml/dispatches \
  -d '{"ref":"main"}'
```

## Engineering Deep Dive

GitHub's 60-day inactivity cutoff applies specifically to public repositories using on.schedule. Importantly, previous runs of the scheduled workflow itself do NOT count as repository activity unless they push a commit, nor do opened issues or stars reset the timer. Once day 60 arrives without git activity, the workflow transitions to state: disabled_inactivity in the Actions API.

Many blog posts recommend committing a dummy file every 30 days from inside a GitHub Action using GITHUB_TOKEN to keep the repo 'active'. Treat empty keepalive commits with caution: polluting git history solely to bypass abuse-prevention timers violates GitHub Terms of Service if done purely to mine free compute, and noisy automated commits clutter git log and trigger unnecessary downstream CI/CD builds.

For legitimate production maintenance on stable open-source or static repositories, two clean engineering solutions work permanently without history spam. First, enabling Dependabot security/version updates naturally produces legitimate dependency commits whenever upstream packages or Actions versions release. Second, replacing on.schedule with workflow_dispatch invoked by an external zero-cost cron trigger (such as a Cloudflare Worker Cron Trigger or monitoring webhook) completely sidesteps disabled_inactivity because API-dispatched runs are never suspended for repo age.

## GitHub Actions 60-Day Inactivity Suspension Rules

| Case / Engine | Protocol Behavior | Production Remediation |
| :--- | :--- | :--- |
| **Public repository with 0 pushes for 60 days** (`#public-repo-60-day-rule`) | Workflow transitions to disabled_inactivity; all on.schedule triggers halt after a 7-day warning email. | Run gh workflow enable <workflow-id> or push a commit to reset, or trigger via workflow_dispatch. |
| **Private / Enterprise repository** (`#private-repo-inactivity`) | Billed against account Actions minutes quota; not subject to the public-repo free-compute 60-day cutoff. | Still monitor workflow failure notifications and runner minute quotas. |
| **Forked repository with .github/workflows** (`#forked-repo-schedules`) | Scheduled workflows are disabled by default immediately upon forking to prevent surprise runs. | Manually enable Actions in the fork's Actions tab if scheduled runs are intentionally desired. |
| **External cron calling workflow_dispatch API** (`#workflow-dispatch-external`) | Immune to 60-day inactivity disabling and immune to :00 schedule queue drops. | Store fine-grained Actions: Read/Write PAT in external scheduler and POST /dispatches. |

## Frequently Asked Engineering Questions

### Does pushing a commit automatically re-enable a disabled_inactivity workflow?

Pushing a commit resets the inactivity counter before day 60, and modifying the workflow file itself re-registers it, but once a workflow enters disabled_inactivity state, you should explicitly run gh workflow enable <name> (or click 'Enable workflow' in the Actions UI) and verify state == 'active' via gh api.

### How can we monitor whether any org workflows silently entered disabled_inactivity?

Query GET /repos/{owner}/{repo}/actions/workflows across your organization and alert whenever any workflow object returns state: 'disabled_inactivity' instead of 'active'.

### Why are scheduled workflows disabled when I fork an upstream project?

GitHub disables all workflows with on.schedule on newly created forks by default so contributors who fork a repo to submit a single pull request do not accidentally run upstream nightly deployment or scraping jobs.

## Related Problem-Cluster Guides

- [GitHub Actions Schedule Timezone Syntax, 5-Minute Floor, and Queue Delay Fixes](https://opslint.dev/cron/github-actions-schedule-timezone-and-queue-delay/) — Configure native IANA timezones on GitHub Actions on.schedule triggers, avoid silent 5-minute interval clamping, and eliminate top-of-hour queue delays.
- [Cloudflare Workers Cron Triggers: UTC Syntax, L/W/# Modifiers, and Multi-Cron Routing](https://opslint.dev/cron/cloudflare-workers-cron-triggers-utc-expressions/) — Configure wrangler.jsonc triggers.crons in UTC, dispatch multiple schedules cleanly via controller.cron in scheduled(), and protect async tasks with ctx.waitUntil.
- [AWS EventBridge Rules (UTC Only) vs EventBridge Scheduler (IANA Timezones)](https://opslint.dev/cron/aws-eventbridge-rules-utc-vs-scheduler-timezone/) — Why legacy CloudWatch / EventBridge Rules ignore local timezones and DST, and how to migrate to AWS EventBridge Scheduler with ScheduleExpressionTimezone.
- [Cron Jobs Skipped During Daylight Saving Time Spring Forward (02:00–02:59 Gap)](https://opslint.dev/cron/dst-spring-forward-skipped-jobs/) — Why 02:30 local cron schedules vanish on Kubernetes CronJob and AWS EventBridge while Vixie Cron runs catch-up at 03:00, and how to prevent missed runs.
