Free Cron Expression Generator & Explainer
Create crontab schedules visually with intuitive selectors, or translate any cron expression into plain, human-readable language.
Current Cron Expression
Human-Readable Translation:
Every 5 minutes.
Next 5 Expected Executions (Local Time)
- Calculating...
Understanding Cron Jobs & Cron Expressions
In backend development, system administration, and devops workflows, automated tasks are essential. A cron job is a time-based job scheduler in Unix-like operating systems (including Linux, macOS, and BSD). Users set up cron jobs to run commands or scripts at specific times, intervals, or dates automatically. Common use cases include generating daily reports, syncing files, pulling emails, performing regular database backups, running log rotation, or scheduling system updates.
The configuration of a cron job is defined in a configuration file called a crontab (short for "cron table"). Each line in a crontab file represents a scheduled task. This task is written as a specialized syntax known as a cron expression. While cron expressions are compact and highly flexible, their syntax can be difficult to interpret or write by memory. That is why this Cron Expression Generator & Explainer is designed to visually build, edit, and translate crontab expressions into plain language instantly in your browser.
The Crontab Expression Structure
A standard cron expression consists of five space-separated fields (some implementations, like Quartz, Spring, or AWS, support six or seven fields including seconds or years, but standard Linux cron tables always use exactly five fields). The columns are evaluated in the following order:
| Field # | Field Name | Allowed Values | Special Characters |
|---|---|---|---|
| 1 | Minute | 0 - 59 | * , - / |
| 2 | Hour | 0 - 23 (24-hour format) | * , - / |
| 3 | Day of Month | 1 - 31 | * , - / L W ? |
| 4 | Month | 1 - 12 (or JAN-DEC) | * , - / |
| 5 | Day of Week | 0 - 6 (Sunday to Saturday, or SUN-SAT) | * , - / L # ? |
Decoding Cron Special Characters
To build complex schedule intervals, cron utilizes several special character operators inside the five fields:
- Asterisk (
*): Represents "every" or "all". An asterisk in the hour field means "every hour" of the day. - Comma (
,): Used to list multiple discrete values. For example, setting Day of Week to1,3,5schedules the task only on Monday, Wednesday, and Friday. - Hyphen (
-): Defines a range of values. An hour setting of9-17schedules the task to run every hour between 9:00 AM and 5:00 PM inclusive. - Slash (
/): Specifies step increments. A minute value of*/10translates to "every 10 minutes" starting from minute 0. Similarly,5/15means "every 15 minutes starting from minute 5" (at minute 5, 20, 35, 50). - Question Mark (
?): Used in some environments (like Java scheduler or AWS) as a placeholder instead of an asterisk when specifying "no specific value" to avoid conflict between Day of Month and Day of Week.
Practical Crontab Scheduling Examples
Here is a quick reference table of common cron schedules frequently implemented in real-world application architectures:
| Schedule Intention | Cron Expression | Translation Explainer |
|---|---|---|
| Every hour on the hour | 0 * * * * | Runs at minute 0 of every hour (e.g. 1:00, 2:00) |
| Every 15 minutes | */15 * * * * | Runs at minute 0, 15, 30, and 45 of every hour |
| Daily at midnight | 0 0 * * * | Runs once every day at 12:00 AM |
| Business hours weekdays | 0 9-17 * * 1-5 | Runs on the hour, from 9:00 AM to 5:00 PM, Monday to Friday |
| Weekly database backup | 0 2 * * 0 | Runs at 2:00 AM every Sunday morning |
| Monthly log rotation | 0 1 1 * * | Runs at 1:00 AM on the first day of every month |
How to Setup a Cron Job on Linux / Unix
To configure automated tasks on your web server or development machine, use the crontab terminal command line utility. Here are the core commands to manage schedules:
- Edit your crontab: Run
crontab -e. This opens your user cron configuration file inside your default text editor (such as Vim or Nano). - Add your schedule: Append a line specifying the cron expression, followed by the script path. For example:
0 3 * * * /usr/bin/python3 /home/user/backup.py >> /var/log/backup.log 2>&1
This expression runs your backup script daily at 3:00 AM and redirects both output logs and error logs to a file. - View active crontab schedules: Run
crontab -lto list all active scheduled jobs under your system user profile. - Remove all user schedules: Run
crontab -rto delete all scheduled tasks. Use this command with caution.
Standard Cron Shorthand Nicknames
Many Linux cron implementations support shorthand nicknames as human-friendly alternatives to the standard five-field numeric expression. You can replace the five columns with:
@reboot: Runs once at system startup.@hourly: Equivalent to0 * * * *(Runs once every hour on the hour).@daily(or@midnight): Equivalent to0 0 * * *(Runs once every day at 12:00 AM).@weekly: Equivalent to0 0 * * 0(Runs once every Sunday at midnight).@monthly: Equivalent to0 0 1 * *(Runs once on the first day of every month).@yearly(or@annually): Equivalent to0 0 1 1 *(Runs once on January 1st at midnight).
Frequently Asked Questions
anacron which are built to execute missed tasks once the system wakes up.flock. For example: flock -n /tmp/myjob.lock /home/user/script.sh will skip execution if a previous instance is still active.Need to inspect other systems?
Check out other free utilities for developers and conversion tasks: