Skip to content
Latchkey

How to Run a Job on a Schedule with a Timezone in GitHub Actions

GitHub evaluates schedule cron in UTC only, so a job meant for 9am local fires at the wrong hour unless you account for the offset.

Express the cron in UTC, and if you need a local wall-clock time, add a guard step that checks the current time in your target timezone.

Steps

  • Convert your desired local time to UTC and write that into the cron.
  • For DST-sensitive jobs, schedule both candidate UTC hours and guard inside the job.
  • Use TZ plus date to compute the local hour in a guard step.
  • Exit early when the local hour is not the intended one.

Workflow

.github/workflows/report.yml
on:
  schedule:
    - cron: '0 13,14 * * *'   # candidate 9am America/New_York (EST/EDT)
jobs:
  report:
    runs-on: ubuntu-latest
    steps:
      - name: Only run at 09:00 New York time
        run: |
          HOUR=$(TZ=America/New_York date +%H)
          if [ "$HOUR" != "09" ]; then
            echo "Not 9am local ($HOUR); skipping."
            exit 0
          fi
      - run: ./generate-report.sh

Gotchas

  • Scheduled runs can be delayed under load; do not rely on minute-exact timing.
  • Schedules only run on the default branch.
  • Latchkey runs scheduled jobs on cheaper managed runners that retry if a transient launch fails.

Related guides

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