Cron 表达式解析器
解析和解释 Cron 计划表达式
minute (0-59) | hour (0-23) | day (1-31) | month (1-12) | weekday (0-6)
常用示例
最后更新:
关于此工具
Cron 表达式解析器把 Unix cron、GitHub Actions、Kubernetes CronJob 等使用的 5 字段语法翻译成自然语言,并显示下几次执行时间。5 个字段为分钟/小时/日/月/星期,支持通配符(*)、范围、列表、步进等语法。
使用方法
- Type a cron expression like 0 9 * * 1-5 into the input.
- Read the human-readable description that appears below — it confirms what your expression actually means.
- Inspect the next execution times to verify edge cases (month boundaries, leap years, etc.).
- Click any example expression to load it as a starting point.
- Copy the validated expression into your crontab, GitHub Actions workflow, or Kubernetes manifest.
常见用例
- Scheduling a daily database backup at 3 AM (0 3 * * *).
- Running a CI workflow every Monday morning (0 9 * * 1).
- Triggering a cleanup job every 15 minutes (*/15 * * * *).
- Sending a weekly digest email Friday afternoon (0 17 * * 5).
- Defining a Kubernetes CronJob to rotate logs at midnight on the first of each month.
- Validating a tricky expression that uses ranges and steps before deploying it.
常见问题
Q. Why does my expression run at unexpected times?
A. Cron interprets day-of-month and day-of-week as OR (not AND) when both are restricted. * * 15 * 1 fires on the 15th OR every Monday — not just Mondays falling on the 15th.
Q. What time zone does cron use?
A. Whatever the host or container is configured for. GitHub Actions cron runs in UTC. Kubernetes CronJobs default to the cluster controller manager time zone unless you set spec.timeZone.
Q. Are 6-field cron expressions supported?
A. Some schedulers (Quartz, AWS EventBridge) add a seconds or year field. This parser uses the standard 5-field POSIX format.
Q. How do I run a job once at a specific time?
A. Cron itself does not have a one-shot mode. Use systemd timers, an at job, or an event-based trigger instead.