⚙ GitHub Actions Cron YAML
- UTC timezone: GitHub Actions always runs cron in UTC. Adjust your hour offset accordingly.
- Minimum interval: GitHub supports a minimum of 5 minutes (
*/5 * * * *). Shorter intervals are not guaranteed. - Delay at peak: Scheduled workflows may be delayed 15–30 minutes during GitHub's peak load. Don't use cron for time-sensitive tasks.
- Inactive repos: GitHub disables scheduled workflows in repos with no activity for 60 days.
Understanding Cron Syntax
A cron expression has exactly 5 space-separated fields. Each controls one dimension of timing:
Special Characters
*/5 in minutes = 0, 5, 10, 15 … every 5 minutes.1-5 in day-of-week = Mon through Fri.0,6 in day-of-week = Sunday and Saturday.Expression Reference — click any row to load it
| Expression | Meaning |
|---|---|
| * * * * * | Every minute (1,440× per day) |
| */5 * * * * | Every 5 minutes — minimum for GitHub Actions |
| 0 * * * * | At the start of every hour (1:00, 2:00, …) |
| 0 0 * * * | Every day at midnight (00:00) |
| 0 12 * * * | Every day at noon (12:00 PM) |
| 0 9 * * 1-5 | At 9:00 AM on weekdays (Mon–Fri) |
| 30 17 * * 1-5 | At 5:30 PM on weekdays |
| 0 9,17 * * * | At 9 AM and 5 PM every day |
| 0 0 * * 0 | Every Sunday at midnight |
| 0 0 1 * * | Midnight on the 1st of every month |
| 0 0 1 1 * | Midnight on January 1st (once per year) |
| */10 9-17 * * 1-5 | Every 10 min during business hours, weekdays |
Cron FAQ
What is a cron expression?
A cron expression is a 5-field string that defines a repeating schedule for automated tasks. The fields are minute hour day-of-month month day-of-week, each separated by a space. Special characters (*, /, -, ,) let you express "every," "every N," ranges, and lists. For example, 0 9 * * 1-5 means "at 9:00 AM on weekdays."
What does * * * * * mean?
Five asterisks mean "every minute of every hour, every day" — the maximum cron frequency. It fires 1,440 times per day. This is almost always too frequent for real workloads. GitHub Actions enforces a minimum of 5 minutes (*/5 * * * *); Linux cron has no minimum but running every minute is expensive.
How do I write a cron expression for GitHub Actions?
GitHub Actions uses standard 5-field cron syntax in UTC. Add it under on: schedule: - cron: in your .github/workflows/*.yml file. The minimum supported interval is 5 minutes. GitHub may delay scheduled runs by 15–30 minutes during peak load. Repos with no activity for 60 days have their scheduled workflows automatically disabled.
How do I run a cron job at a specific time every day?
Set minute and hour to your target time, leave the remaining three fields as *. Example: 0 14 * * * runs at 2:00 PM every day. 30 6 * * * runs at 6:30 AM. Cron uses 24-hour format: 0 is midnight, 12 is noon, 23 is 11 PM. Remember to account for timezone — Linux cron uses the system timezone, GitHub Actions always runs in UTC.
How do I restrict a cron job to weekdays only?
Use 1-5 in the 5th field (day-of-week). Example: 0 9 * * 1-5 runs at 9 AM, Monday through Friday. Days are numbered 0 (Sunday) through 6 (Saturday). For weekends only, use 0,6. For a single day, use the number alone — 0 9 * * 1 runs only on Mondays.
What is the difference between day-of-month and day-of-week?
Day-of-month (field 3) restricts to specific calendar dates (1st, 15th, etc.). Day-of-week (field 5) restricts to specific days of the week (Mon, Tue, etc.). When both are non-*, most cron systems apply OR logic — the job runs if either condition matches. To run on "the first Monday of every month," you'd need to check the date inside your script, since cron can't natively express complex calendar logic.