Deconstructing the 5-Field Cron Syntax
A classic Unix cron expression comprises five space-delimited fields: Minute (0-59), Hour (0-23 in 24-hour time), Day of the Month (1-31), Month (1-12 or JAN-DEC), and Day of the Week (0-6 where 0 represents Sunday).
Special characters enable flexible recurrence patterns: Asterisk (*) means every unit, Slash (/) designates step increments (e.g., */15 = every 15 minutes), Comma (,) lists multiple specific points (e.g., 1,15 = at minute 1 and 15), and Hyphen (-) defines ranges (e.g., 1-5 = Monday through Friday).
Common Pitfalls: Timezones and Day-of-Week Offsets
A widespread production bug occurs when developers assume server cron executes in their local timezone. Most cloud servers and container clusters run on UTC (Coordinated Universal Time). Scheduling a backup for "0 2 * * *" means 02:00 AM UTC, which could coincide with peak business hours in local timezones.
Additionally, some implementations consider Sunday as 0, while others treat Sunday as 7. Using 1-5 for standard weekdays avoids Sunday ambiguity.
Step-by-Step Tutorial
Select Recurrence Frequency
Pick minutes, hourly, daily, weekly, or custom intervals in the DocSwift Cron Builder.
Examine Plain English Schedule
The tool translates expressions like "*/10 9-17 * * 1-5" to "Every 10 minutes between 09:00 and 17:59, Monday through Friday".
Copy Expression
Copy the verified cron string directly into your crontab, GitHub Actions workflow YAML, or cloud console.
Ready to Try It Yourself?
DocSwift processes everything directly on your device. Fast, safe, and completely free forever.
How helpful was this guide?
Rated 4.9 / 5 by 3,420+ users worldwide
Share with Colleagues & Friends
Help others protect their document privacy
Frequently Asked Questions
What is the difference between 5-field and 6-field cron?
Standard Unix cron uses 5 fields. Some systems like Quartz or AWS EventBridge use 6 or 7 fields (adding seconds and years).
How do I edit my Linux crontab file?
Run "crontab -e" in your terminal to edit tasks for your current user, or "crontab -l" to list active schedules.