The quick and simple editor for cron schedule expressions
Common Cron Examples
What is a Cron Expression?
Cron expressions are used to configure scheduled tasks in Unix-like operating systems. A cron expression is a string of 5 fields separated by spaces that represents a set of times to execute a task.
Each field can contain specific values, ranges, lists, or wildcards:
- 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, where 0 is Sunday)
Special Characters
*- Any value (wildcard),- List of values (e.g., 1,3,5)-- Range of values (e.g., 1-5)/- Step values (e.g., */5 means every 5 units)
Frequently Asked Questions
What is a cron job?
A cron job is a scheduled task in Unix-like operating systems that runs automatically at specified times or intervals. Cron jobs are commonly used for system maintenance, backups, sending emails, and other repetitive tasks.
How do I use this cron generator?
Simply select values from the dropdown menus for each time field (minute, hour, day, month, day of week). The cron expression will be generated automatically. You can also click on the examples to quickly fill in common patterns.
What does */5 mean in a cron expression?
The */5 syntax means "every 5 units". For example, */5 in the minute field means "every 5 minutes", while */2 in the hour field means "every 2 hours". The asterisk represents all values, and /5 means step by 5.
Can I schedule a cron job to run multiple times a day?
Yes! You can use step values (like */6 for every 6 hours) or list specific hours separated by commas (like 6,12,18 to run at 6 AM, noon, and 6 PM). The cron syntax is very flexible for complex schedules.
What's the difference between day of month and day of week?
Day of month (1-31) refers to the specific date, like the 15th. Day of week (0-6) refers to the day name, where 0 is Sunday and 6 is Saturday. If you specify both, the cron will run when either condition is met (OR logic).
How do I schedule a task for weekdays only?
Use the range 1-5 in the day of week field. Monday is 1 and Friday is 5, so 1-5 represents all weekdays. For example: 0 9 * * 1-5 runs every weekday at 9 AM.
Where do I put my cron expression?
On Unix-like systems, edit your crontab file by running crontab -e in the terminal. Then add a new line with your cron expression followed by the command to execute. The format is: [cron expression] [command]
Is this tool free to use?
Yes! This cron expression generator is completely free to use. No registration or payment required. Use it as much as you need for your projects.