Cron is the quiet workhorse behind almost every automated task on Linux and macOS — backups, log rotation, cache warming, report emails, health checks. But the syntax is famously unforgiving. One misplaced asterisk and your "run once a day" job fires every single minute.
This cheat sheet skips the theory and gives you 25 cron expressions you can copy, paste, and ship — grouped by how often you actually need them. Bookmark it, and never Google "cron every 5 minutes" again.
Just want to build one visually? Skip the syntax entirely and drag-and-drop your schedule with our free Visual Cron Builder, or generate + validate an expression with the Cron Expression Generator.
How to Read a Cron Expression (60-Second Refresher)
A standard cron line has five fields, separated by spaces, followed by the command to run:
┌ minute (0-59) ┌ hour (0-23) ┌ day-of-month (1-31) ┌ month (1-12) ┌ day-of-week (0-6, Sun=0)
So 30 2 * * * reads as: at minute 30, hour 2, every day, every month, every day of week — i.e. 2:30 AM daily. The four operators you'll use constantly:
*— every value ("every hour", "every day")*/n— every n units (*/15= every 15)a-b— a range (1-5= Monday through Friday)a,b,c— a specific list (0,30= on the hour and half-past)
Every-Minute & Every-Few-Minutes Schedules
| Cron | Runs |
|---|---|
* * * * * | Every minute (great for testing, terrible for production) |
*/5 * * * * | Every 5 minutes |
*/10 * * * * | Every 10 minutes |
*/15 * * * * | Every 15 minutes (quarter-hour polling) |
*/30 * * * * | Every 30 minutes |
Gotcha: */7 * * * * does not mean "every 7 minutes forever." Cron restarts the step count at the top of each hour, so it fires at :00, :07, :14 … :56, then jumps to :00 again (a 4-minute gap). For clean intervals, use a divisor of 60 (5, 10, 12, 15, 20, 30).
Hourly Schedules
| Cron | Runs |
|---|---|
0 * * * * | Every hour, on the hour |
0 */2 * * * | Every 2 hours |
0 */6 * * * | Every 6 hours (00:00, 06:00, 12:00, 18:00) |
15 * * * * | Every hour at 15 minutes past |
0 9-17 * * * | Every hour, 9 AM to 5 PM (business hours) |
Daily Schedules
| Cron | Runs |
|---|---|
0 0 * * * | Every day at midnight |
30 2 * * * | Every day at 2:30 AM (classic backup window) |
0 9 * * * | Every day at 9:00 AM |
0 8,20 * * * | Twice daily — 8 AM and 8 PM |
Weekly & Weekday Schedules
| Cron | Runs |
|---|---|
0 9 * * 1-5 | 9 AM every weekday (Mon–Fri) |
0 18 * * 5 | 6 PM every Friday |
0 0 * * 0 | Midnight every Sunday (weekly rollover) |
0 10 * * 6,0 | 10 AM on weekends (Sat & Sun) |
Day-of-week trap: Both 0 and 7 mean Sunday in most cron implementations. And if you fill in both day-of-month and day-of-week, classic Vixie cron runs the job when either matches — not both. Leave one as * unless you truly want the OR behavior.
Monthly, Quarterly & Yearly Schedules
| Cron | Runs |
|---|---|
0 0 1 * * | Midnight on the 1st of every month (invoicing, reports) |
0 0 1 1,4,7,10 * | Start of each quarter (Jan, Apr, Jul, Oct) |
0 0 1 1 * | Once a year — midnight, January 1st |
Handy Named Shortcuts
Most modern cron daemons (and job schedulers like systemd timers, GitHub Actions, and Kubernetes CronJobs) accept these readable aliases:
| Shortcut | Equivalent |
|---|---|
@hourly | 0 * * * * |
@daily / @midnight | 0 0 * * * |
@weekly | 0 0 * * 0 |
@monthly | 0 0 1 * * |
@yearly / @annually | 0 0 1 1 * |
@reboot | Once, at system startup |
The 3 Mistakes That Break Cron Jobs
1. Assuming the server's timezone
Cron runs in the system timezone, not yours. A 0 9 * * * job on a UTC server fires at 9 AM UTC — which might be 4 PM or 1 AM where your users are. Check with timedatectl, and if you need a specific zone, set CRON_TZ=America/New_York at the top of the crontab. Confused about the offset? Our Time Zone Converter and Unix Timestamp Converter settle it fast.
2. Relying on your shell's PATH
Cron runs with a minimal environment — often just /usr/bin:/bin. A script that works in your terminal can fail silently because node, python3, or docker isn't found. Always use absolute paths (/usr/local/bin/node) or set PATH= explicitly at the top of the crontab.
3. No logging, so failures vanish
By default cron emails output to the local mailbox nobody reads. Redirect instead: append >> /var/log/myjob.log 2>&1 to capture both stdout and stderr. Future-you debugging a 3 AM failure will be grateful.
Build & Validate Your Own — Free, No Signup
Reading a cron line is one thing; writing a correct one under deadline pressure is another. Instead of guessing, generate it visually and see the next run times before you deploy:
Visual Cron Builder → Cron Expression Generator →Both are 100% browser-based — no install, no account, nothing leaves your machine.
Automating more than cron? If you run a solo business or side project on scripts and scheduled jobs, our Ultimate AI Prompt Vault — 68 Prompts to Run Your Entire Solo Business pairs perfectly with your automation stack: prompts for writing cron wrappers, drafting alert copy, summarizing logs, and turning raw output into readable reports.
Copy, Paste, Ship
The vast majority of real-world scheduling needs are covered by fewer than a dozen patterns — the ones above. Keep this cheat sheet open in a tab, lean on the visual builder for the tricky cases, and always double-check the timezone and PATH before you call a cron job "done."
All tools referenced in this article are free at ToolNest — 60+ browser-based developer & everyday utilities. No signup, no tracking, completely free.