All cheat sheets
Cheat Sheet

Cron Expressions

Quick reference for cron expression syntax: fields, special characters, common schedules, and platform differences (Linux, GitHub Actions, AWS, Quartz).

A cron expression is a string of 5 (or 6) fields separated by spaces that defines a recurring schedule for a job. It is used in Unix/Linux cron daemons, GitHub Actions, Kubernetes CronJobs, AWS EventBridge, and many other schedulers.

Timezone: cron runs in the server's local timezone. GitHub Actions always uses UTC. Make sure your times account for the target timezone.

Expression Anatomy

0minute
9hour
*day/month
*month
1day/week

At 09:00, every Monday

Field Reference

PosFieldAllowed valuesSpecial characters
1Minute0–59* , - /
2Hour0–23* , - /
3Day of month1–31* , - / ? L W
4Month1–12 or JAN–DEC* , - /
5Day of week0–6 or SUN–SAT* , - / ? L #
6Second0–59* , - / (Quartz, Spring only)

Special Characters

*

Wildcard

Matches every value of the field.

* * * * * — every minute
,

List

Separates multiple values.

0 9,17 * * * — at 09:00 and 17:00
-

Range

Specifies a continuous range of values.

0 9-17 * * * — every hour 9am–5pm
/

Step

Every N units. */5 means every 5 units starting from 0.

*/15 * * * * — every 15 minutes
?

Any

Quartz · AWS

Used in day-of-month or day-of-week to mean "no specific value". Avoids conflicts when specifying both fields.

0 0 1 * ? — midnight on the 1st
L

Last

Quartz · AWS

Last day of the month, or last weekday. In day-of-week, 5L means last Friday.

0 0 L * * — midnight last day of month
W

Weekday

Quartz · AWS

Nearest weekday (Mon–Fri) to a given day of the month.

0 9 15W * * — 9am on weekday nearest the 15th
#

Nth weekday

Quartz only

The Nth occurrence of a weekday in a month.

0 9 * * 1#2 — 9am on 2nd Monday

Common Examples

ExpressionMeaning
* * * * *
Every minute
0 * * * *
Every hour, on the hour
*/15 * * * *
Every 15 minutes
5 */2 * * *
At :05 of every 2 hours
0 0 * * *
Every day at midnight
0 9 * * 1-5
Every weekday at 9:00 AM
0 9-17 * * 1-5
Every hour from 9am to 5pm, weekdays
30 8 * * 1-5
Weekdays at 8:30 AM
0 9,17 * * 1-5
At 9:00 AM and 5:00 PM on weekdays
0 0 * * 0
Every Sunday at midnight
0 0 1 * *
First day of every month at midnight
0 0 1,15 * *
Midnight on the 1st and 15th of each month
0 0 1 1 *
Every 1st of January at midnight

@ Shortcuts

AliasEquivalentMeaning
@rebootRun once at startup
@hourly0 * * * *Every hour at minute 0
@daily0 0 * * *Every day at midnight
@midnight0 0 * * *Same as @daily
@weekly0 0 * * 0Every Sunday at midnight
@monthly0 0 1 * *First day of every month at midnight
@yearly0 0 1 1 *Every 1st of January at midnight
@annually0 0 1 1 *Same as @yearly

Supported in: Linux/Unix cron, Kubernetes. Not available in GitHub Actions, AWS EventBridge, or Quartz.

Platform Differences

PlatformFieldsNotes
Unix / Linux cronmin hour dom month dowStandard 5-field format. Supports @ shortcuts. Runs in local timezone.
GitHub Actionsmin hour dom month dow5-field format. Always UTC. Minimum interval: 5 minutes.
Kubernetes CronJobmin hour dom month dow5-field format. Supports @hourly, @daily, @weekly, @monthly, @yearly.
AWS EventBridgemin hour dom month dow year6-field format with year. ? required in either dom or dow.
Quartz Schedulersec min hour dom month dow [year]6–7 fields. Seconds are the first field. Supports ?, L, W, #.
Spring @Scheduledsec min hour dom month dow6-field Quartz-style. Seconds first. No year field.

Try our Cron Expression Parser →

Paste any cron expression and get an instant human-readable explanation of when it fires.