What is Cron?
Cron is a time-based job scheduler in Unix-like operating systems. Users define scheduled tasks using cron expressions — compact strings that encode when a job should run.
┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-7, 0=Sun)
│ │ │ │ │
* * * * *
Special Characters
| Character | Description | Example |
|---|
* | Any value | * * * * * = every minute |
, | Value list | 1,15 * * * * = at minute 1 and 15 |
- | Range | 1-5 * * * * = minutes 1 through 5 |
/ | Step | */10 * * * * = every 10 minutes |
Common Cron Expressions
| Expression | Description |
|---|
* * * * * | Every minute |
0 * * * * | Every hour |
0 0 * * * | Every day at midnight |
0 0 * * 0 | Every Sunday at midnight |
0 0 1 * * | First day of every month |
*/5 * * * * | Every 5 minutes |
0 9-17 * * 1-5 | Every hour 9am-5pm, weekdays |
Frequently Asked Questions
What is a cron expression?
A cron expression is a string of five or six fields separated by spaces that represents a schedule. The fields are: minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-7).
What does */5 * * * * mean?
This cron expression means 'every 5 minutes'. The */5 in the minute field means 'every 5th minute', and the asterisks mean 'every' for hour, day, month, and day of week.
What is the difference between 5-field and 6-field cron?
Standard Unix cron uses 5 fields (minute, hour, day, month, weekday). Some systems like Spring and Quartz add a 6th field for seconds at the beginning.
Is my data safe?
Yes. All generation happens in your browser. No data is sent to any server.