Cron Syntax Explained: How to Build Unix Cron Expressions Visually
Master the structure of Unix crontab files, understand the 5-field syntax, and build schedules without syntax errors.

For developers and system administrators, automating repetitive tasks is key to efficiency. In Unix-like operating systems, this is done using **cron jobs**, which run scripts at scheduled intervals. However, writing **cron expressions** can be confusing and prone to syntax errors.
Let's break down the 5-field cron syntax and learn how to construct schedules confidently.
The 5-Field Cron Syntax
A standard cron expression consists of 5 fields separated by spaces:
``` ┌───────────── minute (0 - 59) │ ┌───────────── hour (0 - 23) │ │ ┌───────────── day of the month (1 - 31) │ │ │ ┌───────────── month (1 - 12) │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday) │ │ │ │ │ * * * * * ```
Common Operators
- **Asterisk (*)**: Represents "every" value (e.g. * in the minute field means "every minute").
- **Comma (,)**: Defines a list of values (e.g. "1,15,30" in the hour field).
- **Hyphen (-)**: Defines a range (e.g. "1-5" in the day of week field for Monday through Friday).
- **Slash (/)**: Specifies step values (e.g. "*/15" in the minute field means "every 15 minutes").
Example Schedules
- **Every night at midnight**: `0 0 * * *`
- **Every Sunday at 4:30 AM**: `30 4 * * 0`
- **Every hour during work days (Mon-Fri)**: `0 * * * 1-5`
- **Every 30 minutes on the 1st of the month**: `*/30 * 1 * *`
Why Use a Visual Generator?
Writing schedules manually can lead to severe mistakes—like running a heavy database backup during peak traffic hours instead of at night. A visual tool lets you select natural options like "every day" or "on weekends" and gives you immediate feedback, preventing downtime.
Try the calculator
Generate copy-ready schedules easily. Use our Cron Expression Generator to select frequencies visually, inspect individual field breakdowns, and copy Unix-compliant cron strings instantly.
Try the calculator
Build cron expressions visually. Pick a schedule frequency, set the time, and instantly get a copy-ready Unix cron string with a human-readable description.