Cron Generator
分・時・日・月・曜日をセレクトUIで選ぶだけでcron式を自動生成。日本語での実行タイミング説明とよく使うプリセット付き。
How to Use the Cron Generator
Build a five-field cron expression (minute, hour, day of month, month, day of week) without memorizing syntax. For each field, choose a mode — every value, a specific value, a range, or a step interval — from a dropdown, and the tool assembles the expression and a plain-language description of when it will run.
Features
- Select UI for all five cron fields: every / specific / range / step
- Live cron expression and Japanese-language execution schedule, updated as you choose
- Eight ready-made presets for common schedules like weekdays at 9 AM or every 5 minutes
- One-click link to the Cron Parser to double-check the next run times before deploying
- Runs entirely in your browser with no external requests
Builder vs. Parser
This Generator is for composing a schedule from scratch by picking values in dropdowns. If you already have a cron expression and want to verify what it does or see upcoming run times, use the companion Cron Parser instead — the two tools are designed to be used together.
Cron Generatorの使い方
分・時・日・月・曜日の各フィールドで「毎回」「指定」「範囲」「間隔」のいずれかをセレクトで選ぶだけで、 cron式が自動的に組み立てられます。cron記法(*, /, -, ,)を覚えていなくても、 「平日9時0分」のような要件をそのまま設定でき、生成結果は日本語の実行タイミング説明としても表示されます。
1. crontab登録前にノーコードで式を組み立てる
「深夜3時にバックアップを実行したい」といった要件を、時フィールドで「指定」→3、分フィールドで「指定」→0を選ぶだけで0 3 * * * という正しい式を得られます。手打ちでの1文字ミス(例: 3を30と間違える)を防げます。
2. GitHub Actions / Cloud Schedulerのスケジュール設計
平日の営業時間だけ動かす監視ジョブなど、曜日フィールドで「範囲」→月〜金、時フィールドで「範囲」→9〜18を選べば、* 9-18 * * 1-5 のような式を組み合わせられます。生成後はCron Parserで実際の次回実行時刻を確認し、タイムゾーンのずれがないかも確認してから登録してください。
3. 定期実行の間隔だけを素早く決めたい場合
「5分おきにヘルスチェック」のような要件は、分フィールドで「間隔」→5を選ぶだけで*/5 * * * * が生成されます。プリセットの「5分おき」ボタンからも同じ式をワンクリックで呼び出せます。
モードの意味 / What Each Mode Means
| モード / Mode | 意味 / Meaning | 生成される記法 / Cron Syntax |
|---|---|---|
| 毎回 / every | そのフィールドの制約なし(全ての値で実行) No restriction on this field (fires for every value) | * |
| 指定 / specific | 1つの値のみ一致した時に実行 Fires only when the value matches exactly | 9 |
| 範囲 / range | 開始〜終了の連続する値で実行 Fires for every value in a contiguous range | 1-5 |
| 間隔 / step | N単位ごとに実行(0起点) Fires every N units, starting from the field's minimum | */5 |
よくある注意点 / Common Pitfalls
| 症状 / Symptom | 原因 / Cause | 対処 / Fix |
|---|---|---|
| 意図しない日にも実行される Fires on unexpected days | 日(day of month)と曜日(day of week)を両方「毎回」以外にした(OR条件) Both day-of-month and day-of-week set to non-every values (they combine with OR) | どちらか一方は「毎回」のままにする Leave one of the two fields set to "every" |
| GitHub Actionsで9時間ずれて実行される Runs 9 hours off on GitHub Actions | schedule トリガーはUTCで評価される The schedule trigger is evaluated in UTC | JSTの目標時刻から9時間引いた時刻を指定する Subtract 9 hours from the target JST time |
| 「間隔」モードが意図した時刻からズレる Step mode does not start at the expected time | */N はフィールドの最小値(0または1)起点でN単位ごとに実行される*/N starts counting from the field's minimum (0 or 1), not from your chosen anchor | 特定の時刻起点にしたい場合は「指定」または「範囲」を使う Use "specific" or "range" mode when you need a fixed anchor time |
Before / After 実例 / Before & After
例1: 平日9時0分に実行 / Weekdays at 9:00
設定 / Settings: 分=指定(0), 時=指定(9), 曜日=範囲(月〜金)↓
0 9 * * 1-5例2: 5分おきのヘルスチェック / Health check every 5 minutes
設定 / Settings: 分=間隔(5)↓
*/5 * * * *例3: 毎月1日0時0分にバッチ実行 / Monthly batch on the 1st at 00:00
設定 / Settings: 分=指定(0), 時=指定(0), 日=指定(1)↓
0 0 1 * *Why browser-only? / なぜブラウザ完結か
Building a cron expression rarely happens in isolation — people often note the deploy target, job name, or internal script path alongside it while working things out. This tool assembles and describes the expression entirely with client-side JavaScript, so nothing you select or type is sent to a server, and the page keeps working offline once loaded.
cron式を組み立てる作業では、デプロイ先やジョブ名、内部スクリプトのパスなどをメモしながら 試行錯誤することが多くあります。本ツールは式の生成・説明表示をすべてブラウザ内のJavaScriptで行い、 選択内容が外部に送信されることはありません。
関連ツール / Related Tools
開発をもっと効率的に
PR