Skip to main content

Cron Expression Tool

Cron Expression

0
Minute
0-59
9
Hour
0-23
*
Day
1-31
*
Month
1-12
1-5
Weekday
0-6

Common Presets

每分钟* * * * *每小时0 * * * *每天午夜0 0 * * *每周日午夜0 0 * * 0每月1日午夜0 0 1 * *工作日上午9点0 9 * * 1-5每5分钟*/5 * * * *每10分钟*/10 * * * *每30分钟*/30 * * * *每天0点和12点0 0,12 * * *

Syntax Reference

SymbolMeaningExample
*Any value* * * * *
,List separator1,15 * * * *
-Range1-5 * * * *
/Step*/5 * * * *

How to Use

Expression Mode

Enter a Cron expression directly, and the tool will validate it in real-time, showing:

  • Whether the expression is valid
  • Human-readable execution description
  • Next 10 execution times

Visual Builder

Select values for each field using dropdown menus to automatically generate the corresponding Cron expression.

Cron Expression Format

A standard Cron expression consists of 5 fields:

┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of week (0 - 6, 0 = Sunday)
│ │ │ │ │
* * * * *

Common Examples

ExpressionDescription
* * * * *Every minute
0 * * * *Every hour on the hour
0 0 * * *Every day at midnight
0 9 * * 1-5Weekdays at 9 AM
*/5 * * * *Every 5 minutes
0 0 1 * *1st of every month at midnight
0 0 * * 0Every Sunday at midnight

FAQ

What is a Cron expression?
A Cron expression is a time format for configuring scheduled tasks, made up of 5 fields (minute, hour, day of month, month, day of week). It precisely describes when a task runs and is widely used in Linux crontab and various job schedulers.
What do the 5 fields of a Cron expression represent?
From left to right: minute (0-59), hour (0-23), day of month (1-31), month (1-12), day of week (0-6, 0 = Sunday). For example, `0 9 * * 1-5` runs at 9 AM on weekdays.
How do I run a task every 5 minutes?
Use the expression `*/5 * * * *`, which runs every 5 minutes. `*/n` means every n units.
What is the difference between Cron and crontab?
Cron is the background service in Linux that runs scheduled tasks, crontab is the command-line tool for managing Cron jobs, and Cron expressions are the syntax that defines execution times.
Does it support 6 or 7 field Cron expressions?
This tool mainly supports the standard 5-field Cron expression. Some systems (like Spring) support an extra seconds or year field, but standard Linux crontab uses the 5-field format.
Share this tool