Skip to content
Latchkey

How to Schedule Heavy CI Jobs Off-Peak

Not every check needs to run on every PR. Moving heavy suites off-peak keeps the PR path fast while still running the slow work regularly.

Some jobs (full e2e, cross-browser, load tests) are too slow to gate every PR. Scheduling them off-peak on a cron or nightly cadence keeps fast feedback on PRs while still catching regressions.

1. Run heavy suites on a schedule

Trigger the slow suite on a nightly cron instead of every push.

.github/workflows/nightly.yml
on:
  schedule:
    - cron: '0 3 * * *'  # 03:00 UTC nightly
  workflow_dispatch:

2. Gate heavy jobs behind a label

Let authors opt a PR into the heavy suite with a label when a change warrants it, instead of running it on all.

.github/workflows/ci.yml
if: contains(github.event.pull_request.labels.*.name, 'run-e2e')

3. Keep the PR path to fast checks

PRs should run unit and lint and affected tests only. The full matrix runs nightly so a slow suite never blocks a merge.

4. Off-peak scheduling pairs with cheaper runners

Heavy nightly jobs are exactly where managed-runner cost savings add up. At about 69 percent cheaper than hosted runners, a nightly full-matrix run is far cheaper on Latchkey; model it at /learn/github-actions-cost-calculator.

Key takeaways

  • Run heavy suites on a nightly cron, not on every PR.
  • Gate optional heavy jobs behind a PR label for opt-in runs.
  • Keep the PR path to fast checks so slow suites never block merges.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →