DevFormatter
Cron Generator › Examples

Cron Expression Examples

50+ common cron schedules ready to use. Click any expression to open it in the cron generator.

Every N minutes

Expression Description Use
* * * * * Every minute Use →
*/2 * * * * Every 2 minutes Use →
*/5 * * * * Every 5 minutes Use →
*/10 * * * * Every 10 minutes Use →
*/15 * * * * Every 15 minutes Use →
*/20 * * * * Every 20 minutes Use →
*/30 * * * * Every 30 minutes Use →

Hourly

Expression Description Use
0 * * * * Every hour at minute 0 Use →
30 * * * * Every hour at minute 30 Use →
0 */2 * * * Every 2 hours Use →
0 */3 * * * Every 3 hours Use →
0 */4 * * * Every 4 hours Use →
0 */6 * * * Every 6 hours Use →
0 */12 * * * Every 12 hours Use →

Daily

Expression Description Use
0 0 * * * Every day at midnight (00:00) Use →
0 1 * * * Every day at 1:00 AM Use →
0 6 * * * Every day at 6:00 AM Use →
0 8 * * * Every day at 8:00 AM Use →
0 9 * * * Every day at 9:00 AM Use →
0 12 * * * Every day at noon (12:00) Use →
0 17 * * * Every day at 5:00 PM Use →
0 18 * * * Every day at 6:00 PM Use →
0 23 * * * Every day at 11:00 PM Use →
30 7 * * * Every day at 7:30 AM Use →

Weekdays & weekends

Expression Description Use
0 9 * * 1-5 Every weekday at 9:00 AM Use →
0 8 * * 1-5 Every weekday at 8:00 AM Use →
0 17 * * 1-5 Every weekday at 5:00 PM Use →
30 12 * * 1-5 Every weekday at 12:30 PM Use →
0 0 * * 6,0 Every Saturday and Sunday at midnight Use →
0 10 * * 6,0 Every weekend at 10:00 AM Use →
0 9 * * 1 Every Monday at 9:00 AM Use →
0 9 * * 5 Every Friday at 9:00 AM Use →

Weekly

Expression Description Use
0 0 * * 0 Every Sunday at midnight Use →
0 0 * * 1 Every Monday at midnight Use →
0 8 * * 1 Every Monday at 8:00 AM Use →
0 9 * * 3 Every Wednesday at 9:00 AM Use →
0 17 * * 5 Every Friday at 5:00 PM Use →
0 3 * * 0 Every Sunday at 3:00 AM Use →

Monthly

Expression Description Use
0 0 1 * * First day of every month at midnight Use →
0 0 15 * * 15th of every month at midnight Use →
0 9 1 * * First day of every month at 9:00 AM Use →
0 0 1,15 * * 1st and 15th of every month at midnight Use →
0 0 L * * Last day of every month at midnight Use →
0 6 1 * * First day of every month at 6:00 AM Use →

Yearly & quarterly

Expression Description Use
0 0 1 1 * Once a year — January 1st at midnight Use →
0 0 1 1,4,7,10 * First day of each quarter at midnight Use →
0 0 1 */3 * Every 3 months on the 1st Use →
0 9 1 1 * January 1st at 9:00 AM Use →
0 0 1 6 * June 1st at midnight Use →
0 0 1 12 * December 1st at midnight Use →

CI / CD & DevOps

Expression Description Use
0 2 * * * Nightly build at 2:00 AM Use →
0 3 * * 0 Weekly cleanup every Sunday at 3:00 AM Use →
*/5 * * * * Health check every 5 minutes Use →
0 1 * * * Nightly database backup at 1:00 AM Use →
0 4 * * 0 Weekly dependency update every Sunday at 4:00 AM Use →
0 0 * * 1 Weekly report generation every Monday at midnight Use →
30 23 * * * End-of-day log rotation at 11:30 PM Use →
0 6 * * 1-5 Warm-up cache every weekday morning at 6:00 AM Use →

How to read a cron expression

A cron expression is a compact string of five space-separated fields that specifies a recurring schedule. Reading left to right, the fields are minute, hour, day of month, month, and day of week.

Field Position Range Special characters
Minute 1st 0–59 * , - /
Hour 2nd 0–23 * , - /
Day of month 3rd 1–31 * , - / ? L W
Month 4th 1–12 or JAN–DEC * , - /
Day of week 5th 0–7 (0 and 7 = Sunday) or SUN–SAT * , - / ? L #

Special character reference

* Every value in the field's range
*/n Every nth value (step) — e.g. */15 in minutes = 0, 15, 30, 45
a-b Range from a to b inclusive — e.g. 1-5 in day-of-week = Mon–Fri
a,b,c Explicit list of values — e.g. 1,15 in day-of-month = 1st and 15th
L Last — in day-of-month means the last day of the month; in day-of-week means the last occurrence of that weekday in the month (Quartz / EventBridge only)

Platform differences

Heads up — not all cron syntaxes are identical

The five-field format shown in the examples above is standard Unix cron, but several platforms extend or alter the syntax. Copy-pasting expressions between platforms without checking can produce unexpected schedules or parse errors.

Platform Fields Notes
Linux crontab 5 (min hr dom mon dow) Standard POSIX format; @weekly and similar aliases supported by Vixie cron
macOS launchd via cron 5 Same 5-field syntax; Apple recommends launchd plist files for new jobs
GitHub Actions 5 Standard 5-field cron; always runs in UTC; minimum interval ~5 minutes in practice
AWS EventBridge Scheduler 6 (sec min hr dom mon dow yr) Adds seconds at start and year at end; requires ? in either dom or dow (not both *); supports L and #
Quartz Scheduler / Spring @Scheduled 6 or 7 (sec min hr dom mon dow [yr]) Seconds field prepended; supports L, W (nearest weekday), and # (nth weekday)

Frequently asked questions

What is a cron expression?
A cron expression is a string of five fields separated by spaces that defines a recurring schedule for a cron job — a task run automatically by the system at set intervals. The five fields represent, in order: minute (0–59), hour (0–23), day of month (1–31), month (1–12), and day of week (0–7, where both 0 and 7 are Sunday). Each field accepts a specific value, a wildcard (*), a range (1-5), a list (1,3,5), or a step (*/15). Cron was introduced in Unix in the 1970s and remains the standard scheduling mechanism on Linux, macOS, and cloud platforms including GitHub Actions and AWS EventBridge. The cron daemon reads a crontab file and spawns the specified command whenever the current time matches the expression.
What does * * * * * mean?
The expression * * * * * means "every minute of every hour of every day of every month on every day of the week." Each asterisk is a wildcard that matches all valid values for its field. In practice this schedule fires 1,440 times per day — once per minute — making it useful only for high-frequency health checks or demo purposes. Because it triggers so often it is rarely appropriate for database backups, report generation, or any task that takes more than a few seconds to complete. If you need a job every minute but only during business hours you would write * 9-17 * * 1-5, replacing the second and fifth wildcards with a range and list respectively.
What does */5 mean in a cron expression?
The */5 syntax is a step value. In the minute field it means "at every 5th minute": 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, and 55. The general form is */n, where n is the step size relative to the start of the field's range. In the minute field */10 fires at 0, 10, 20, 30, 40, 50. In the hour field */6 fires at 00:00, 06:00, 12:00, and 18:00. You can also combine a range with a step: 10-50/10 in the minute field fires at minutes 10, 20, 30, 40, and 50. Step values work in all five standard cron fields and are supported by Linux crontab, macOS cron, GitHub Actions, and most scheduling systems.
What is the difference between 0 0 * * 0 and @weekly?
0 0 * * 0 and @weekly are functionally identical on most cron implementations: both run once a week at midnight on Sunday (00:00 Sunday). The @weekly nickname — along with @daily, @hourly, @monthly, and @yearly — is a convenience alias supported by Vixie cron (the standard on most Linux distributions) and by GitHub Actions. However, these aliases are not part of the POSIX cron standard and are not recognised by some minimal implementations such as BusyBox cron, AWS EventBridge, or Quartz Scheduler. For maximum portability always use the explicit five-field expression 0 0 * * 0 rather than the alias.
How do I run a cron job every 30 minutes?
Use the expression */30 * * * * to run a job every 30 minutes. This fires at minute 0 and minute 30 of every hour, every day. The step syntax */30 means "every 30th minute starting from 0", so it triggers at :00 and :30. If you want to offset the start — for example at :15 and :45 — use the list form 15,45 * * * * instead of a step. Some schedulers such as AWS EventBridge do not support */30 in the minute field for intervals that do not evenly divide 60; in those cases use the explicit list. For jobs that must run exactly every 30 minutes regardless of execution time, consider a persistent process with a sleep loop rather than cron, since cron does not account for job duration.
How do I schedule a cron job on the last day of the month?
On Linux crontab and macOS cron there is no built-in "last day of month" token; the workaround is to check inside the job script whether tomorrow is the 1st: schedule 0 23 28-31 * * and add a guard [ $(date -d tomorrow +%d) -eq 1 ] && /path/to/script.sh. On Quartz Scheduler and AWS EventBridge Scheduler, the special character L in the day-of-month field means "last day": 0 0 L * ? in Quartz or cron(0 0 L * ? *) in EventBridge. GitHub Actions does not support L. If your workload runs on a cloud scheduler that supports L, that is the cleanest solution. For raw Linux cron the script-based workaround is the only portable approach.
What timezone do cron jobs run in?
By default, cron jobs run in the system timezone of the host machine. On most Linux servers this is UTC, but it depends entirely on how the OS is configured. GitHub Actions cron schedules always run in UTC, regardless of repository or runner settings. AWS EventBridge Scheduler lets you specify a timezone per schedule (defaulting to UTC). Kubernetes CronJob resources default to the cluster's timezone; Kubernetes 1.25+ added a timeZone field to override per job. To confirm the timezone your cron daemon uses, run crontab -l and check for a CRON_TZ or TZ variable at the top of the file — Vixie cron honours CRON_TZ=America/New_York set as an environment variable within the crontab.
What is the difference between cron and crontab?
Cron is the daemon — the background service that continuously checks scheduled tasks and runs them at the right time. Crontab (short for "cron table") is the configuration file that lists the jobs cron should run, one expression-plus-command per line. Each user on a Unix system can have their own crontab file, edited with the crontab -e command and stored in /var/spool/cron/crontabs/. The system also has a /etc/cron.d/ directory for system-wide jobs. The word "crontab" is therefore used in two senses: the file format and the command-line utility used to manage that file. The cron daemon itself requires no configuration — it simply reads all crontabs and fires matching commands.
How do I test a cron expression without waiting?
The fastest approach is to use an online cron expression parser such as DevFormatter's Cron Generator, which shows the next 10 scheduled times instantly. Command-line tools include cronitor validate and the Python library croniter (pip install croniter), which can list upcoming fire times programmatically. For end-to-end testing on Linux, temporarily edit the crontab to trigger every minute (* * * * *) while your script writes a timestamp to a log file, then restore the real schedule once confirmed. On macOS, launchd job agents can be tested with launchctl start com.example.yourjob. AWS EventBridge provides a "Next 10 trigger dates" preview in the console. Never rely solely on the expression parser — always verify that the actual command runs successfully in the target environment.
Are cron expressions the same in AWS EventBridge and Linux cron?
No. AWS EventBridge Scheduler uses a six-field cron syntax wrapped in cron(...): the first field is seconds (0–59), making the full format cron(seconds minutes hours day-of-month month day-of-week year). Linux crontab uses five fields with no seconds field and no year field. EventBridge also requires that exactly one of day-of-month or day-of-week be ? (not both wildcards at the same time), which is not a Linux cron rule. The L (last) and # (nth weekday) special characters are supported in EventBridge but not in standard Linux crontab. This means you cannot copy a Linux cron expression directly into EventBridge without adjusting the field count and ? placement. Always consult the AWS EventBridge Scheduler documentation when migrating schedules between platforms.

Related tools