Examples: 0 * * * * · 0 9 * * 1-5 · */5 * * * * · 0 0 1 * * · 30 4 1,15 * 5 · @weekly
The five fields
| Field | Allowed values |
|---|---|
| minute | 0-59 |
| hour | 0-23 |
| day of month | 1-31 |
| month | 1-12 or jan-dec |
| day of week | 0-7 (0 and 7 are both Sunday) or sun-sat |
* means every value, 1-5 a range, 1,15 a list, and */15 or 0-23/2 a step.
The day-of-month vs day-of-week trap
When both day fields are restricted, cron runs the job when either matches, not both. The crontab manual's own example: 30 4 1,15 * 5 runs at 4:30 am on the 1st and 15th of each month, plus every Friday. There is no standard way to say "the first Friday of the month"; run on days 1-7 and check the weekday inside the script.
Macros
@hourly = 0 * * * *, @daily = 0 0 * * *, @weekly = 0 0 * * 0, @monthly = 0 0 1 * *, @yearly = 0 0 1 1 *, and @reboot runs once after the system starts.
GitHub Actions schedules
GitHub Actions uses POSIX cron syntax and runs schedules in UTC by default (a time zone can optionally be set). The shortest interval it allows is once every 5 minutes, and schedules run on the latest commit of the default branch.
Which time zone will my cron job run in?
| Where it runs | Time zone | Notes |
|---|---|---|
| Linux crontab (cronie) | Set it with CRON_TZ in the crontab | crontab(5): CRON_TZ "specifies the time zone specific for the cron table". During daylight-saving changes, jobs in the skipped hour don't run and jobs in the repeated hour can run twice. |
| GitHub Actions | UTC by default | An optional IANA timezone can be set per cron entry (for example timezone: "America/New_York"). Scheduled runs can be delayed when load is high. |
| Vercel Cron Jobs | Always UTC | Vercel says Cron Jobs are moving to Schedules, which include time zones. |
| Kubernetes CronJob | The kube-controller-manager's local time zone, unless .spec.timeZone is set | Set .spec.timeZone: "Etc/UTC" (or your zone). CRON_TZ or TZ inside the schedule is not supported and is rejected. |
| Cloudflare Workers Cron Triggers | UTC | - |
So 0 9 * * * on GitHub Actions without a time zone runs at 09:00 UTC: 14:30 in India (IST, UTC+5:30), and 04:00 or 05:00 in New York depending on daylight saving. Tick show next runs in UTC above to see the times the server will use.
Sources
- crontab(5), Linux manual page: man7.org/linux/man-pages/man5/crontab.5.html
- GitHub Docs: Events that trigger workflows (schedule): docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows
- Vercel Docs: Cron Jobs: vercel.com/docs/cron-jobs
- Kubernetes docs: CronJob (time zones): kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
- Cloudflare Workers docs: Cron Triggers: developers.cloudflare.com/workers/configuration/cron-triggers/