Cron Expression Parser
Parse cron expressions into plain English and preview next 5 execution times.
minute · hour · day-of-month · month · day-of-week
| Field | Value | Range | Meaning |
|---|---|---|---|
| Minute | 0 | 0–59 | 0 |
| Hour | 9 | 0–23 | 9 |
| Day (month) | * | 1–31 | every day |
| Month | * | 1–12 | every month |
| Day (week) | 1-5 | 0–6 | 1-5 (range) |
cron構文を理解する
フィールドリファレンス
一般的なパターン
cronはUnix系システムでのスケジュールされた自動化のバックボーンです。cron式を使うと「毎週平日の午前8時5分」や「1月1日に年に1回」といった精度でスケジュールを指定できます。5フィールドの構造を理解すれば、ほぼあらゆる繰り返しスケジュールを表現できます。
開発者はレガシーコードベースから引き継いだcronジョブをここに貼り付け、変更する前に実際にどのスケジュールで実行されているかを確認します。SREは次回実行プレビューを使って、メンテナンスウィンドウのジョブがピークトラフィック時間中に発火しないことを確認します。スケジュールされたタスクの見逃しをデバッグするエンジニアはパーサーを使って式が構文的に有効で次の実行時間が期待と一致することを確認します。GitHub Actionsのワークフローファイルをレビューするチームはスケジュールトリガーを貼り付けて、技術に詳しくないステークホルダーのために平易な英語に翻訳します。
- 分: 0〜59 — */5で5分ごとを指定
- 時: 0〜23 — 9-17で営業時間を指定
- 日(月): 1〜31 — 1,15で月2回を指定
- 月: 1〜12またはJAN〜DEC — */3で四半期ごとを指定
- 曜日: 0〜6(日=0)またはSUN〜SAT — 1-5で平日を指定
- * * * * * — 毎分
- 0 * * * * — 毎時0分
- 0 0 * * * — 毎日深夜0時
- 0 0 * * 0 — 毎週日曜日の深夜0時
- 0 0 1 * * — 毎月1日の深夜0時
- 0 0 1 1 * — 毎年1月1日
- */15 * * * * — 15分ごと
- 0 9-17 * * 1-5 — 平日の営業時間中は毎時
よくある質問
- What is a cron expression?
- A cron expression is a string of five (or six) fields separated by spaces that defines a recurring schedule for automated tasks. It is used in Unix-like systems, CI/CD pipelines, cloud schedulers (AWS EventBridge, GCP Cloud Scheduler), and application frameworks to trigger jobs at specific times.
- What are the five fields in a cron expression?
- The five fields are, in order: Minute (0–59), Hour (0–23), Day of Month (1–31), Month (1–12 or JAN–DEC), and Day of Week (0–6 or SUN–SAT, where 0 = Sunday). Example: '0 9 * * 1-5' means 9:00 AM every weekday.
- What does */15 mean in a cron expression?
- The */n syntax means 'every n units'. So */15 in the minute field means 'every 15 minutes' (i.e., at :00, :15, :30, :45). Similarly, */2 in the hour field means 'every 2 hours'.
- Can I use commas and ranges together?
- Yes. You can combine lists (1,3,5), ranges (1-5), and steps (*/2 or 1-10/2) in a single field using commas. For example, '0,30 9-17 * * 1-5' means every 30 minutes from 9 AM to 5 PM on weekdays.
- Why do some cron expressions have 6 or 7 fields?
- The standard Unix cron uses 5 fields. Some systems add a seconds field at the start (making it 6 fields), or a year field at the end (making it 7 fields). This parser handles the standard 5-field format used by most Linux crons, GitHub Actions schedules, and cloud schedulers.
関連ツール
- JSON Formatter, Validator & Repair Tool
Format, minify, validate, and repair JSON instantly in your browser. Sort keys alphabetically, auto-format on paste, download as file, escape/unescape strings — free, no sign-up, 100% client-side.
- QRコード生成
URL、テキスト、Wi-FiなどのQRコードを生成。PNGでダウンロード可能。
- パスワード生成
カスタム長と文字セットで強力なランダムパスワードを生成。
- Base64 エンコーダー / デコーダー
テキストをBase64にエンコード、または逆にデコード。
- URLエンコーダー / デコーダー
パーセントエンコーディングでURLとクエリ文字列をエンコードまたはデコード。