Cron Job Examples — Common Cron Expressions Reference
Reference guide for common cron expressions with human-readable descriptions. Build and validate cron schedules for Linux cron, GitHub Actions, Kubernetes, and AWS EventBridge.
Understanding Cron Expression Syntax
A cron expression has 5 fields: minute hour day-of-month month day-of-week. Each field accepts a number, range (1-5), step (*/15), list (1,3,5), or wildcard (*). Use the cron generator to build expressions visually and get a human-readable description before deploying.
- Every minute:
* * * * * - Every hour:
0 * * * *(at minute 0) - Daily at midnight:
0 0 * * * - Weekdays at 9 AM:
0 9 * * 1-5 - First of every month:
0 0 1 * *
Choose the Right Variant
- This page: Cron expression reference — common patterns with descriptions
- Cron Expression Generator: Build and validate cron expressions visually
- Kubernetes CronJob: K8s spec.schedule field expressions
- GitHub Actions Schedule: on:schedule cron triggers
Common Cron Expression Reference
* * * * *— Every minute*/5 * * * *— Every 5 minutes*/15 * * * *— Every 15 minutes*/30 * * * *— Every 30 minutes0 * * * *— Every hour (at :00)0 */2 * * *— Every 2 hours0 */6 * * *— Every 6 hours0 0 * * *— Daily at midnight0 2 * * *— Daily at 2:00 AM (common for nightly backups)0 9 * * 1-5— Weekdays at 9:00 AM0 9 * * 1— Every Monday at 9:00 AM0 0 * * 0— Every Sunday at midnight0 0 1 * *— First day of every month0 0 L * *— Last day of every month (some systems)0 0 1 1,4,7,10 *— Quarterly (Jan, Apr, Jul, Oct 1st)0 0 1 1 *— Annually on January 1st
Cron Field Reference
- Field 1 — Minute: 0–59 |
*any |*/5every 5 min - Field 2 — Hour: 0–23 |
*any |9-17business hours - Field 3 — Day of month: 1–31 |
*any |1,151st and 15th - Field 4 — Month: 1–12 or JAN–DEC |
*any - Field 5 — Day of week: 0–7 (0 and 7 both = Sunday) or SUN–SAT |
1-5Mon–Fri
Privacy and Data Handling
All cron expression validation and generation runs locally in your browser. No data is sent to any server.
Frequently Asked Questions
What does */ mean in a cron expression?
The */n syntax is a "step" value — it means "every n units". */5 in the minute field means "every 5 minutes" (0, 5, 10, 15, ..., 55). */2 in the hour field means "every 2 hours" (0, 2, 4, 6, ..., 22). You can combine with ranges: 8-18/2 means "every 2 hours from 8 to 18" (8, 10, 12, 14, 16, 18). Steps are widely supported but not in all cron implementations — check your platform's documentation.
How do I run a cron job on the last day of the month?
Standard cron has no built-in "last day of month" field. The workaround: schedule for day 28 and check in your script if it's the last day before executing. For systems that support it (newer cron implementations, Quartz Scheduler, some cloud schedulers), the L character in the day-of-month field means "last day" — 0 0 L * *. For standard cron (Linux, most systems), test with: 0 0 28-31 * * [ "$(date +\%d -d tomorrow)" = "01" ] && your_command
How do I run a cron job every weekday at a specific time?
Use values 1–5 in the day-of-week field (1=Monday, 5=Friday): 0 9 * * 1-5 runs every weekday at 9:00 AM. Note: in cron, 0 and 7 both represent Sunday — 0-5 would include Sunday. Always use 1-5 for Monday-to-Friday. To run on a specific weekday only, use a single value: 0 9 * * 1 runs only on Mondays. Combine with month ranges for quarterly weekday runs: 0 9 * 1,4,7,10 1 runs on Monday in January, April, July, and October.