Skip to content
Latchkey

How to Schedule a Run at a Specific Timezone in GitHub Actions

GitHub cron has no timezone field, so convert your target local time to UTC and, if DST matters, verify inside the job.

Compute the UTC equivalent of your desired local time and put that in cron. Because UTC does not observe daylight saving, add a guard step that skips when the local hour is wrong.

Steps

  • Convert the target local time to UTC and use that in cron.
  • Add a schedule entry for each offset if you must cover DST changes.
  • Guard with a step that checks the local hour via TZ and exits early if it does not match.

Workflow

.github/workflows/ci.yml
on:
  schedule:
    - cron: '0 13 * * *'   # 09:00 America/New_York during EDT
jobs:
  daily:
    runs-on: ubuntu-latest
    steps:
      - name: Skip if not 09:00 local
        run: |
          HOUR=$(TZ=America/New_York date +%H)
          [ "$HOUR" = "09" ] || { echo "Off-hour, skipping"; exit 0; }
      - run: ./daily-task.sh

Gotchas

  • A fixed UTC cron drifts by one hour across daylight saving transitions.
  • The TZ guard requires the tzdata package, which the ubuntu runners already include.

Related guides

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