View Source Crontab Spec

Basic Format

A cron expression consists of 5-6 fields representing time units:

# ┌────────────── second (optional)
# │ ┌──────────── minute
# │ │ ┌────────── hour
# │ │ │ ┌──────── day of month
# │ │ │ │ ┌────── month
# │ │ │ │ │ ┌──── day of week
# │ │ │ │ │ │
# │ │ │ │ │ │
# 0 * * * * *

Field Values

FieldRequiredValuesSpecial Characters
SecondNo0-59* / , -
MinuteYes0-59* / , -
HourYes0-23* / , -
Day of MonthYes1-31* / , -
MonthYes1-12 or JAN-DEC* / , -
Day of WeekYes0-6 or SUN-SAT* / , -

Note: Month and Day-of-week values are case-insensitive.

Special Characters

  • * - Any value
  • / - Step values (e.g., */15 - every 15 units)
  • , - Value list (e.g., 1,3,5)
  • - - Range (e.g., 1-5)

Predefined Schedules

ExpressionDescriptionEquivalent
@yearlyOnce a year (midnight, Jan 1)0 0 0 1 1 *
@monthlyOnce a month (midnight, first day)0 0 0 1 * *
@weeklyOnce a week (midnight, Sunday)0 0 0 * * 0
@dailyOnce a day (midnight)0 0 0 * * *
@hourlyOnce an hour0 0 * * * *
@minutelyOnce a minute0 * * * * *

Fixed Intervals

For simpler scheduling needs, use @every with a duration:

% Run every 30 minutes
"@every 30m"

% Run every 1 hour and 30 minutes
"@every 1h30m"

Duration units: d (days), h (hours), m (minutes), s (seconds)