Your scheduled GitHub job may have quietly stopped
GitHub disables scheduled workflows in public repos after 60 days of inactivity.
Published here · 2 sources · Resume reading
GitHub disables scheduled workflows in public repositories after 60 days without activity. The workflow shows no failed run because the cron stopped being scheduled entirely. The banner says "This scheduled workflow is disabled because there hasn't been activity in this repository for at least 60 days" [1].
Check the workflow state
The REST API returns a state field with five possible values [2]:
gh api repos/OWNER/REPO/actions/workflows \
--jq '.workflows[] | "\(.state) \(.path)"'You should see active, disabled_inactivity, disabled_fork, disabled_manually, or deleted. The one to look for is disabled_inactivity.
Re-enable the workflow
Use the API to enable a disabled workflow [2]:
gh api --method PUT repos/OWNER/REPO/actions/workflows/WORKFLOW_ID/enableReplace WORKFLOW_ID with the file name or numeric ID from the previous step.
You should see the state change to active. The next scheduled tick will run as normal.
Run it once by hand
Re-enabling resumes the schedule from the next tick, which can be a day away. To backfill, trigger a manual run:
gh workflow run WORKFLOW_FILEPrevent recurrence
The only documented way to keep the workflow running is to create repository activity before 60 days pass. Making the repository private also works, but that is not always an option.
GitHub does not define exactly which events count as "activity". Treat the 60 days as the rule and anything more specific as unverified.
Send this to the friend whose nightly GitHub job quietly stopped running months ago.
Keep this guide
Filed under Dev tools
Questions about this guide
Does this affect private repos?
No. The 60-day rule applies only to public repositories. Private repos keep running.
Why is there no failed run?
The workflow is disabled, not failed. The cron simply stopped being scheduled, so no run appears in your history.
Sources
- GitHub docs: disabling and enabling a workflowdocs.github.com
- GitHub REST API: workflowsdocs.github.com