Cron Expression Builder
Build and validate cron expressions visually — minute, hour, day, month, weekday fields with human-readable preview.
0 9 * * 1Every Monday, at 9:00 AM
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | 0–59 |
| Hour | 9 | 0–23 |
| Day of month | * | 1–31 |
| Month | * | 1–12 |
| Day of week | 1 | 0 = Sun, 6 = Sat |
cron式のしくみ
cron式の構築方法
一般的なcronパターン
cron式が使われる場所
cron式には5つのフィールドがあり、左から右に読みます:分・時・日(月)・月・曜日。各フィールドは数値、ワイルドカード(*)、範囲(1-5)、リスト(1,3,5)、またはステップ(*/15)を受け付けます。これらを組み合わせることで、コードを1行も書かずにほぼあらゆる繰り返しスケジュールを表現できます。
cron式はUnixに起源を持ちますが、現在では業界全体で標準となっています。Linux/macOSのcrontabが古典的なユースケースです。クラウドプラットフォームも同じ5フィールド形式を使用しています:AWS EventBridge(わずかに拡張された構文)、GCP Cloud Scheduler、Azure Logic Apps、KubernetesのCronJob。GitHub ActionsなどのCI/CDシステムは、スケジュールされたワークフロートリガーにcron構文を使用します。
DevOpsエンジニアはビルダーを使って、毎日午前2時に実行する必要のある夜間データベースバックアップの正しい式を生成します — 0 2 * * *。バックエンド開発者は毎週月曜日の午前9時に週次レポートメールを送信するスケジュール — 0 9 * * 1 — を設定し、デプロイ前に人間が読めるプレビューを確認します。データエンジニアは0 * * * *で時間ごとのETLパイプライントリガーを設定し、より頻繁なポーリングジョブには*/6 * * * *のステップ構文を使用します。SREはKubernetesのCronJobでヘルスチェックジョブを設定し、このツールを使ってプロダクションに反映する前にスケジュールが期待通りの時刻に発火することを確認します。
- 5つのフィールドをそれぞれ入力してください — 「すべて」には*を残す。
- 組み立てられた式と人間が読めるプレビューがライブで更新されるのを確認する。
- プリセットボタンを使って一般的なスケジュールから始める。
- コピーをクリックしてクリップボードに式をコピーする。
- cronスケジューラー(crontab、GitHub Actions、AWS EventBridgeなど)に貼り付ける。
- * * * * * — 毎分
- 0 * * * * — 毎時0分
- 0 0 * * * — 毎日深夜0時
- 0 9 * * 1-5 — 毎週平日の午前9時
- 0 0 1 * * — 毎月1日の深夜0時
- */15 * * * * — 15分ごと
- 0 9,18 * * * — 毎日午前9時と午後6時
- 0 0 * * 0 — 毎週日曜日の深夜0時
よくある質問
- What is a cron expression?
- A cron expression is a string of five space-separated fields that defines a recurring schedule for automated tasks. It is used in Unix/Linux cron jobs, CI/CD pipelines (GitHub Actions, GitLab CI), and cloud schedulers (AWS EventBridge, GCP Cloud Scheduler, Kubernetes CronJobs) to trigger work at precise times without manual intervention.
- What does each field in a cron expression mean?
- The five fields are: Minute (0–59), Hour (0–23), Day of Month (1–31), Month (1–12), and Day of Week (0–6, where 0 = Sunday). Example: '0 9 * * 1' means 'at 9:00 AM every Monday'. An asterisk (*) means 'every valid value for that field'.
- What do *, /, -, and , mean in cron syntax?
- * means 'every' (e.g., * in the minute field = every minute). / means 'step' (*/15 = every 15 units). - defines a range (1-5 in day-of-week = Monday through Friday). , separates a list of values (1,3,5 = Monday, Wednesday, Friday). These can be combined: 1-5/2 means every 2nd day from Monday to Friday.
- How do I run a job every 5 minutes?
- Set the Minute field to */5 and leave all other fields as *. The full expression is '*/5 * * * *'. This fires at :00, :05, :10, :15, and so on throughout every hour of every day.
- What is the difference between Day of Month and Day of Week?
- Day of Month (field 3) targets specific calendar dates — e.g., 1 means the 1st of each month. Day of Week (field 5) targets specific weekdays — e.g., 1 means every Monday. When both are non-asterisk, most cron implementations fire when either condition is met (OR logic), not only when both match.
- Does this tool run the job or just build the expression?
- It only builds the expression string. No jobs are executed. Copy the expression and paste it into your cron scheduler — your Linux crontab, GitHub Actions schedule trigger, AWS EventBridge rule, or whichever platform you use.
関連ツール
- 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とクエリ文字列をエンコードまたはデコード。