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 フィールド構文を自然言語に翻訳し、次回実行時刻も表示します。フィールドは分・時・日・月・曜日で、ワイルドカード(*)、範囲、リスト、ステップが利用できます。

使い方

  1. Type a cron expression like 0 9 * * 1-5 into the input.
  2. Read the human-readable description that appears below — it confirms what your expression actually means.
  3. Inspect the next execution times to verify edge cases (month boundaries, leap years, etc.).
  4. Click any example expression to load it as a starting point.
  5. 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.