教程2026年4月8日
Cron Schedule Syntax: Reading and Writing Time Expressions
Learn how to read and write cron expressions for scheduling automated tasks, with examples for common intervals and edge cases.
Cron expressions control when automated tasks run on servers, in CI/CD pipelines, and in cloud platforms. A single misplaced asterisk can make a job run every minute instead of once daily, potentially costing hundreds in compute fees or flooding a database with duplicate entries.
The syntax looks cryptic at first—0 3 * * 1 or */15 * * * *—but follows a consistent five-field pattern that becomes readable once you understand the structure.
What do the five fields in a cron expression mean?
Standard cron syntax uses five fields separated by spaces: