Skip to content
Latchkey

How to Schedule a GitHub Actions Workflow (Cron)

A schedule trigger runs a workflow on a cron timetable - useful for nightly builds, cleanups, and dependency checks.

Add on.schedule with one or more POSIX cron expressions. Times are always UTC, and the workflow must be on the default branch to fire.

Cron schedule

This runs every day at 02:30 UTC. You can list multiple - cron: entries.

.github/workflows/nightly.yml
on:
  schedule:
    - cron: '30 2 * * *'   # 02:30 UTC daily
jobs:
  nightly:
    runs-on: ubuntu-latest
    steps:
      - run: ./nightly-checks.sh

Gotchas

  • Cron is UTC only - there is no timezone field.
  • Scheduled runs can be delayed (or dropped) during high load; do not rely on exact-minute timing.
  • Schedules pause automatically after 60 days of repo inactivity, and only run on the default branch.

Related guides

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