Sub topic 9
Scheduled run timing, delays and inactivity
This chapter assumes you can write a schedule trigger with a cron expression, as covered in the previous chapter. It explains why a scheduled run often does not start at the exact minute you wrote.
Cron times are UTC
GitHub reads every cron expression as UTC. It does not use your local time zone and does not adjust for daylight saving time. A schedule written as 30 5 * * 1-5 fires at 05:30 UTC. That is 06:30 in London in winter and 07:30 in Berlin in summer. If you need a fixed local time, you must adjust the cron expression twice a year or accept the drift.
The shortest interval GitHub allows is every 5 minutes. A */1 expression is not rejected, but you should not expect a run every minute.
Runs start late, and some are skipped
A cron time is the earliest moment a run can start, not a promise. GitHub queues scheduled runs, and during periods of high load they can be delayed by several minutes or more. Load peaks at the start of every hour, so 0 * * * * is the most congested time you can pick. Under very heavy load, GitHub may drop a queued scheduled run entirely.
Choose an off-peak minute and design the job so that a late or missing run does no harm:
name: Nightly checks
on:
schedule:
- cron: '17 3 * * *'
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "Started at $(date -u +%H:%M) UTC"The minute 17 avoids the busiest slot. Logging the real start time helps you see how much delay you actually get.
Where the schedule is read from
Scheduled workflows run only from the latest commit on the default branch. If you edit the cron line on a feature branch, nothing changes until that edit is merged. The checkout step in a scheduled run also gets the default branch.
Automatic disabling after 60 days
In a public repository, GitHub disables scheduled workflows when the repository has had no activity for 60 days. Runs of the scheduled workflow itself do not count as activity. A quiet repository can therefore stop running its own nightly job without any error.
GitHub sends a notification before it disables the workflow. To restore it, open the Actions tab, select the workflow and choose Enable workflow. A new commit also counts as activity and resets the 60-day period.
Scheduled workflows are also disabled by default in forks. Whoever forks the repository has to enable them by hand.
Quick reference
| Behavior | What to expect |
|---|---|
| Time zone | UTC only |
| Shortest interval | 5 minutes |
| Start time | Can be delayed, and runs can be dropped under load |
| Source of the workflow file | Latest commit on the default branch |
| Public repository with no activity for 60 days | Schedule disabled until re-enabled |
Exercise
Your nightly job is set to 0 0 * * *. It often starts 10 to 20 minutes late, and last month it did not run at all. Name two changes that make it more reliable, and say why the job might also have stopped completely on a public repository.
Show answer
Move the cron minute away from the top of the hour, for example 23 0 * * *, and make the job safe to run late or be skipped, for example by having it process everything since the last successful run. The job may have stopped completely because the public repository had no activity for 60 days, so GitHub disabled its scheduled workflows. Re-enable the workflow in the Actions tab or push a commit.