Cron Expression Tester

Enter Cron Expression
Format: minute hour day month weekday
Common Examples
Cron Format Reference
Field Format:
Field Range Special
Minute 0-59 * , - /
Hour 0-23 * , - /
Day 1-31 * , - /
Month 1-12 * , - /
Weekday 0-7 (0,7=Sun) * , - /
Special Characters:
  • * - Any value
  • , - Value list separator
  • - - Range of values
  • / - Step values
Examples:
  • */5 - Every 5 units
  • 1,3,5 - At 1, 3, and 5
  • 1-5 - From 1 to 5
  • 10-20/2 - Every 2 from 10 to 20

What is a Cron Expression?

A cron expression is a string of 5 space-separated fields that defines the schedule of an automated task on Unix/Linux systems. Each field represents a time unit: minute, hour, day of month, month, and day of week. This format, born with the Unix cron daemon in the 1970s, is now universal: it is used in Linux, macOS, web servers, CI/CD pipelines, cloud platforms (AWS, GCP, Azure), and frameworks like Symfony, Laravel, or Django. Mastering cron syntax lets you automate backups, email sending, data synchronization, or temporary file cleanup β€” without human intervention. This online tool lets you validate and test your cron expressions instantly, with a preview of the next scheduled executions.

What is a cron expression used for? 8 concrete use cases

Automated database backups

Schedule a nightly SQL dump at 2am to never lose your data.

Scheduled email or newsletter sending

Trigger a weekly report email every Monday morning at 8am.

Temporary file cleanup

Automatically delete old cache files or logs every Sunday.

Data synchronization between systems

Sync a product catalog with an ERP every hour via a cron task.

Periodic report generation

Automatically generate a monthly PDF report on the first day of each month.

Uptime monitoring checks

Check every 5 minutes that a URL responds correctly with a monitoring script.

Automatic SSL certificate renewal

Schedule certbot renew with a cron expression to never let a certificate expire.

Data indexing or recalculation

Relaunch an internal search engine or recalculate scores every night at 3am.

Best practices for your cron expressions

  • Always use a validation tool (like this one) before deploying a cron expression to production.
  • Prefer off-peak hours (2am-4am) for heavy tasks to avoid impacting your users.
  • Add a timeout to your cron scripts to prevent zombie processes in case of error.
  • Redirect output to a log file (>> /var/log/myjob.log 2>&1) so you can audit executions.
  • Avoid */1 * * * * (every minute) for long-running tasks β€” prefer a queue system (Redis, RabbitMQ) instead.

Frequently asked questions

How many fields does a cron expression have?
A standard cron expression has 5 fields: minute (0-59), hour (0-23), day of month (1-31), month (1-12), day of week (0-7, where 0 and 7 both represent Sunday). Some systems extend this to 6 fields by adding seconds.
What does * mean in a cron expression?
* means 'every possible value' for that field. For example, * * * * * means 'every minute, every hour, every day'.
How do I schedule a task every 15 minutes?
Use */15 * * * *. The / character defines a step value: here, every 15 minutes starting from 0 (i.e., 0, 15, 30, 45).
What is the difference between 'day of month' and 'day of week'?
The 'day of month' field (3rd position) targets a specific day in the month (e.g., the 15th). The 'day of week' field (5th position) targets a day of the week (e.g., Monday = 1). If both are specified (non-*), the task runs when either condition is true.
How do I run a task only on weekdays?
Use 0 9 * * 1-5 to trigger the task at 9am from Monday (1) to Friday (5). The - defines a range of values.
Does this tool save my cron expressions?
No. Validation runs entirely in your browser. No expression is sent or stored on our servers.
Can cron expressions be used in Symfony?
Yes. Symfony provides the Scheduler component (since Symfony 6.3) and the symfony/console bundle with schedulable commands. Third-party libraries like dragonmantank/cron-expression also allow you to parse and validate cron expressions in PHP.
What is the minimum frequency of a cron job?
On most Unix systems, the minimum frequency is 1 minute (*/1 * * * *). For sub-minute intervals (e.g., every 10 seconds), you need an alternative solution like systemd timers, an infinite loop worker, or a message queue (Redis, RabbitMQ).

Similar tools

JSON Formatter

Format, validate and minify JSON data with syntax highlighting

Use Tool

Password Generator

Create strong, secure passwords with customizable options

Use Tool

IP Information

Discover your public IP address with detailed IPv4/IPv6 information

Use Tool