Cron 表达式生成器Cron Generator
Cron表达式生成与解析,查看执行时间Cron expression generator and parser, view execution times.
描述
每周一到周五 9点 整
字段解析
分
0
0
时
9
9
日
*
每日
月
*
每月
周
1-5
周1到周5
最近执行时间
常用表达式
关于 Cron 表达式生成器About Cron Generator
Cron 表达式用于 Linux、Quartz、K8s 等环境中定义周期任务,但五段式语法全靠记忆,写错就要“半夜报警”。本工具通过可视化面板生成 Cron 表达式,也能反向解析已有表达式,并列出未来若干次执行时间供核对。Cron expressions define recurring tasks in Linux, Quartz, K8s and more, but the five-field syntax relies on memory — a mistake means a 3 a.m. alert. This tool generates Cron expressions from a visual panel, parses existing ones, and lists upcoming execution times for verification.
使用方法How to Use
- 在可视化面板中选择分钟、小时、日、月、周的执行规则。Pick the minute, hour, day, month and weekday rules in the visual panel.
- 工具实时生成对应的 Cron 表达式。The tool generates the matching Cron expression in real time.
- 如需解析已有表达式,直接粘贴到输入框即可查看含义。To parse an existing expression, paste it into the input box to see its meaning.
- 核对列出的未来几次执行时间,确认配置无误后复制到调度系统。Check the listed upcoming run times, then copy the expression into your scheduler once confirmed.
常见问题FAQ
Cron 的五个字段分别是什么?What are the five Cron fields?
从左到右依次为:分钟(0–59)、小时(0–23)、日(1–31)、月(1–12)、星期(0–7,0 和 7 都代表周日)。Left to right: minute (0–59), hour (0–23), day of month (1–31), month (1–12), day of week (0–7, where both 0 and 7 mean Sunday).
“每天凌晨 3 点半执行”怎么写?How do I write "run daily at 3:30 am"?
写作 30 3 * * *,即分钟为 30、小时为 3,其余字段用 * 表示不限制。It is 30 3 * * * — minute 30, hour 3, with * meaning no restriction on the remaining fields.
*/5 和 5 有什么区别?What is the difference between */5 and 5?
*/5 表示“每 5 个单位一次”(如每 5 分钟),5 表示“在第 5 个单位”(如每小时第 5 分钟)。这是初学者最容易混淆的地方。*/5 means "every 5 units" (e.g. every 5 minutes); 5 means "at unit 5" (e.g. minute 5 of each hour). This is the most common beginner confusion.
相关阅读Related Reading
相关工具Related Tools
JSON 格式化JSON Formatter
在线JSON格式化、校验、压缩、美化工具Online JSON formatter, validator, compressor and beautifier.
正则表达式测试Regex Tester
在线正则表达式测试工具,实时匹配高亮Online regex tester with real-time matching and highlighting.
随机密码生成器Password Generator
生成高强度随机密码,支持自定义长度和字符集Generate strong random passwords with customizable length and charset.
UUID 生成器UUID Generator
在线生成UUID/GUID,支持批量生成Generate UUID/GUID online, supports batch generation.