14 October 2026 · Ultracore Team
Cron Syntax Cheat Sheet: Real-World Schedule Examples

Cron is the classic way to run something on a schedule: nightly backups, hourly reports, a cleanup job every Sunday. Linux crontabs, Kubernetes CronJobs, GitHub Actions and most cloud schedulers all use the same five-field syntax.
The five fields
┌───────── minute (0–59)
│ ┌─────── hour (0–23)
│ │ ┌───── day of month (1–31)
│ │ │ ┌─── month (1–12 or JAN–DEC)
│ │ │ │ ┌─ day of week (0–6 or SUN–SAT; 7 is also Sunday)
│ │ │ │ │
* * * * *A job runs when the current time matches every field. Four symbols do most of the work:
*any value,a list:1,15means the 1st and 15th-a range:1-5means Monday to Friday/a step:*/15means every 15
Copy-and-paste schedules
* * * * *: every minute*/5 * * * *: every 5 minutes0 * * * *: every hour, on the hour0 */6 * * *: every 6 hours0 0 * * *: every day at midnight30 2 * * *: every day at 02:30 (a classic quiet time for backups)0 9,17 * * *: twice a day, at 09:00 and 17:000 9 * * 1-5: weekdays at 09:00*/15 9-17 * * 1-5: every 15 minutes during office hours on weekdays0 8 * * 1: every Monday at 08:000 10 * * 6,0: weekends at 10:000 0 1 * *: the first day of every month0 0 1 */3 *: quarterly (January, April, July, October)0 0 1 1 *: once a year, on 1 January
Not sure what an expression does? Paste it into the Cron Expression Generator, which describes it in plain English and lists the next run times.
Pitfalls that break cron jobs
Time zones
Cron uses the server’s time zone, which on cloud servers is usually UTC. “9 AM” in your crontab may be the middle of the night for you. GitHub Actions schedules always run in UTC; Kubernetes CronJobs support a timeZone field in the spec.
Day of month AND day of week
When both day fields are set, standard cron runs the job if either matches. 0 0 13 * 5 runs on every 13th *and* every Friday, not only on Friday the 13th.
The last day of the month
Standard cron has no “last day” symbol. A common workaround runs on days 28–31 and checks whether tomorrow is the 1st:
0 23 28-31 * * [ "$(date -d tomorrow +\%d)" = "01" ] && /path/to/job.shNotice the \%: in a crontab, % means “new line”, so it must be escaped. (date -d is GNU syntax; on macOS use date -v+1d.)
A minimal environment
Cron jobs don’t load your shell profile, so PATH is minimal and commands that work in your terminal fail silently. Use full paths (/usr/bin/python3) or set PATH at the top of the crontab.
Lost output
By default, output is mailed to the local user, which usually means it disappears. Log it instead: >> /var/log/myjob.log 2>&1.
Overlapping runs
If a job sometimes takes longer than its interval, two copies run at once. Wrap it with flock to make sure only one instance runs: flock -n /tmp/myjob.lock /path/to/job.sh.
Build and check your next schedule with the free Cron Expression Generator, including presets for the most common jobs.
Have a project in mind? Let’s talk it through.
A free, no-commitment call to understand what you’re building and how we can help.