建構並檢查 cron 表示式。選擇預設或編輯五個欄位,並查看你時區的下次執行時間。完全在你的瀏覽器中執行。
如何使用 Cron 產生器
選擇預設,或在五個欄位中輸入 cron 表示式。
編輯時查看每個帶標籤並經過校驗的欄位。
查看按你本地時區計算的下次執行時間。
A cron expression is a compact string of five fields that tells a scheduler when to run a task: minute, hour, day of month, month and day of week. It is powerful but easy to get wrong, and a misplaced asterisk can mean a job fires every minute instead of once a day.
Start from a common preset (every hour, every day at midnight, every Monday at 9 AM) or build a custom expression field by field, with each field labeled and validated as you type.
Crucially, it previews the next five run times in your browser's local time zone, so you can confirm the schedule actually does what you intended before you deploy it.
Each field accepts more than a single value: an asterisk means every value, a list like MON,WED,FRI picks several, a range like MON-FRI spans days, and a step like */15 in the minute field runs at 0, 15, 30 and 45 past the hour.
The output works with standard cron on Linux and macOS, crontab, AWS EventBridge, GitHub Actions schedules and most job-scheduling libraries.
One classic trap is setting both day-of-month and day-of-week: standard cron then runs when either matches, not both, so a job can fire more often than expected. Leaving one of the two as an asterisk avoids the surprise.
This tool targets standard five-field cron, so platform extensions like a seconds field or @reboot are not produced here. Remember too that the job runs in the executing server's time zone, which may differ from the local preview.
常見問題
依次為:分鐘、小時、月內日期、月份和星期。星號表示每個值,因此 * * * * * 每分鐘執行一次。
在分鐘欄位使用步長值:*/15 * * * * 在每小時的第 0、15、30 和 45 分鐘執行。
數字 0 到 6(星期日為 0,7 也表示星期日)或像 MON 這樣的三字母名稱。你可以使用範圍(MON-FRI)和清單(MON,WED,FRI)。
當月內日期和星期都被設定時,標準 cron 會在任一符合時執行,而非兩者都符合。將其中一個保留為 * 可避免意外。
本產生器面向標準的五欄位 cron。某些平台增加了秒欄位或 @reboot 等擴充,這裡不會產生。
預覽顯示你瀏覽器本地時區的下次執行時間。執行任務的伺服器使用它自己的時區,因此請確認兩者一致。
嵌入此工具
將此工具加入你自己的網站。複製下方的程式碼片段,它會自動保持最新。
<iframe src="https://monu.tools/embed/zh-Hant/cron-generator" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>相關工具