1. How to run cron
  2. Common examples

Cron expression examples

Copy a common schedule below, or browse 96 expression patterns grouped by timing and scheduler syntax. Duplicate URL aliases are not counted as extra examples.

Common crontab expressions

These use five fields: minute, hour, day of month, month and day of week. Add your command after the expression in your crontab.

Common schedules in five-field crontab syntax
ScheduleCron expression
Every minute* * * * *
Every 5 minutes*/5 * * * *
Every hour0 * * * *
Every 2 hours0 */2 * * *
Every day0 0 * * *
Every day at 2am0 2 * * *
Every sunday0 0 * * SUN
Every weekday0 0 * * 1-5
Every month0 0 1 * *
Every year0 0 1 1 *

For example, this entry runs a backup script every day at 2am. Replace the script path with your own command:

0 2 * * * /usr/local/bin/backup.sh

Check the timezone your scheduler uses. A 2am job can be skipped or run twice when the clocks change for daylight saving time. Standard crontab has no seconds field; six-field expressions belong to schedulers that support seconds, not a regular Linux crontab.

See the crontab manual for field ranges and timezone behavior, or use the cron expression generator to build and validate a schedule.

All cron schedules

Other schedules

Seconds-based schedulers

These six-field expressions include seconds and do not work in standard Linux crontab.

Extended syntax

The # and L operators require a compatible scheduler. Each page includes a guarded Linux alternative where applicable.

Monitor your cron jobs

Get alerted when your cron jobs fail or miss their schedule via Slack, Telegram, PagerDuty, Email, SMS, and more. Plus uptime monitoring and status pages in one platform.

Free 14-day trial · No credit card required

Join thousands of teams already using OnlineOrNot