Introduction to Cron and Scheduled Automation
Cron is the standard time-based job scheduler in Unix-like operating systems. Developers and system administrators rely on cron jobs to automate recurring tasks such as database backups, log rotation, cache warmups, email digest dispatching, and system health checks.
The Anatomy of a 5-Field Crontab Expression
A standard UNIX cron expression consists of five fields separated by white space:
┌───────────── Minute (0 - 59)
│ ┌─────────── Hour (0 - 23)
│ │ ┌───────── Day of Month (1 - 31)
│ │ │ ┌─────── Month (1 - 12 or JAN-DEC)
│ │ │ │ ┌───── Day of Week (0 - 6 or SUN-SAT, 0=Sunday)
│ │ │ │ │
* * * * *
Special Characters & Operators Explained
- Asterisk (
*): Wildcard representing "every" possible value in that field.* * * * *executes every single minute. - Comma (
,): Specifies a list of discrete values. E.g.,0 9,17 * * *fires at 9:00 AM and 5:00 PM. - Hyphen (
-): Defines an inclusive range. E.g.,0 9 * * 1-5runs at 9:00 AM Monday through Friday. - Slash (
/): Specifies step intervals. E.g.,*/15 * * * *runs every 15 minutes (at minute 0, 15, 30, 45).
10 Real-World Production Cron Patterns
| Cron Expression | Human Meaning | Common Use Case |
|---|---|---|
*/5 * * * * | Every 5 minutes | API health ping / queue monitoring |
0 * * * * | At minute 0 of every hour | Hourly aggregate statistics |
0 2 * * * | Every day at 2:00 AM | Nightly database backup |
0 9 * * 1-5 | At 9:00 AM Mon through Fri | Weekday morning standup digest |
0 0 1 * * | At midnight on day 1 of month | Monthly billing cycle generation |
Interactive Testing & Next Execution Timestamps
Before committing automated tasks to your crontab or cloud task runners (AWS EventBridge, Google Cloud Scheduler, GitHub Actions), test your timing syntax with WebUtilities's Cron Expression Builder & Explainer to view the exact human English translation and the next 10 calculated execution timestamps.
Try the Related Tools:
Cron Expression Builder, Explainer & Next Run Schedule
Build standard 5-part and 6-part cron expressions with a visual schedule picker, translate crons into plain human English, and calculate next 10 execution timestamps.
SQL Query Formatter & Beautifier
Format messy, unindented SQL statements into clean, structured queries with capitalized reserved keywords.
UNIX Timestamp Converter & Epoch Timer
Convert between human-readable calendar dates and UNIX epoch timestamps in seconds and milliseconds with live clock.