Free Cron Expression Generator & Explainer

Generate and understand cron expressions easily. Perfect for scheduling automated tasks, system jobs, and DevOps workflows with human-readable explanations.

Cron Expression Builder

Format: minute hour day month day-of-week (e.g., 0 9 * * 1 = 9 AM every Monday)

Common Cron Expression Examples

🕛 Daily at Midnight

0 0 * * *

Runs every day at 12:00 AM

🏢 Weekdays at 9 AM

0 9 * * 1-5

Runs Monday to Friday at 9:00 AM

⏰ Every 15 Minutes

*/15 * * * *

Runs every 15 minutes

📅 First Day of Month

0 0 1 * *

Runs at midnight on the 1st of every month

🗓️ Weekly on Sunday

0 2 * * 0

Runs every Sunday at 2:00 AM

🔄 Every 2 Hours

30 */2 * * *

Runs at 30 minutes past every 2nd hour

Understanding Cron Expressions

Cron expressions are strings that represent a schedule for automated tasks. They consist of five fields separated by spaces, each controlling a different aspect of timing.

Cron Expression Format

minute hour day month day-of-week

Minute (0-59)

Which minute of the hour to run

Hour (0-23)

Which hour of the day to run (24-hour format)

Day (1-31)

Which day of the month to run

Month (1-12)

Which month of the year to run

Day of Week (0-6)

Which day of the week to run (0 = Sunday, 1 = Monday, etc.)

Special Characters

* (Asterisk)

Matches any value (every minute, hour, day, etc.)

/ (Slash)

Step values (*/5 = every 5 units)

- (Dash)

Range of values (1-5 = 1, 2, 3, 4, 5)

, (Comma)

List of values (1,3,5 = 1, 3, and 5)

Common Use Cases

  • Database backups and maintenance tasks
  • Log file rotation and cleanup
  • Data synchronization and ETL processes
  • System monitoring and health checks
  • Email reports and notifications
  • Cache clearing and optimization tasks

Frequently Asked Questions

What is the difference between 0 and 7 for Sunday?

Both 0 and 7 represent Sunday in cron expressions. Most systems accept both values, but 0 is more commonly used and standard.

Can I run a cron job every second?

Standard cron expressions only support minute-level precision. For sub-minute scheduling, you'll need specialized tools or write scripts that loop with delays.

How do I schedule a job to run only on weekdays?

Use 1-5 in the day-of-week field. For example, "0 9 * * 1-5" runs at 9 AM Monday through Friday.

What happens if I specify both day and day-of-week?

When both day-of-month and day-of-week are specified (not *), the job runs when either condition is met (OR logic), not when both are met.