Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk3 min

What a Cron Expression Actually Means (With Examples)

A cron expression selects matching calendar times; it is not the command itself. Learn the five Unix crontab fields, operators, examples, day-field behavior, and scheduler differences.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A cron expression is a schedule: it selects calendar times when a scheduler should run something. It is not a command. In a standard Unix crontab, five fields specify the minute, hour, day of month, month, and day of week; the command follows those fields on the crontab line.

How do I read a standard Unix cron schedule?

Read the five whitespace-separated schedule fields from left to right. The examples below use Cronie’s documented five-field crontab syntax; other systems may use a different grammar.

As an Amazon Associate I earn from qualifying purchases.

Position Field Typical values What it selects
1 Minute 0–59 A minute within the hour
2 Hour 0–23 An hour within the day
3 Day of month 1–31 A calendar day
4 Month 1–12 A calendar month; Cronie also accepts month names
5 Day of week 0–7 A weekday; Cronie accepts 0 or 7 for Sunday and also accepts weekday names

For example, a user crontab entry has the five schedule fields followed by the command to run. System crontab files such as /etc/crontab and files in /etc/cron.d can include a username between the schedule and command. POSIX describes the command as being executed by sh; Cronie documents /bin/sh or the shell configured in the crontab. See the Cronie crontab(5) manual and the POSIX crontab specification.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What do the symbols in a cron expression mean?

Each operator works within the field where it appears; it does not reach across fields.

  • * matches every allowed value in that field.
  • 5 selects only the value 5.
  • 1,15 selects both 1 and 15.
  • 1-5 selects every value from 1 through 5, inclusive.
  • */15 selects every fifteenth value, beginning with the field’s first value. In the minute field, that is 0, 15, 30, and 45.
  • 0-23/2 selects every other hour across the stated hour range.

A slash step is not automatically an elapsed-time interval. In Cronie, 0/35 in the minute field means minutes 0 and 35 of every hour, not one run every 35 minutes measured from the previous run. Likewise, */23 in the hour field matches hours 0 and 23 within each day. Cronie’s field and step documentation explains these rules.

What do common cron expressions mean?

These readings assume Cronie’s five-field crontab syntax:

Rank #2
Funny Planner Scheduler Job Title T-Shirt, Men, Black, Small
  • Show your love for funny sayings with this cute tee. Anyone with a great sense of humor will smile every time they put on this Funny Planner Scheduler Job Title look
  • A great gift for birthdays, Christmas or the holidays - surprise a friend or family member who loves a good laugh with something fun and personal
  • Lightweight, Classic fit, Double-needle sleeve and bottom hem
Expression Meaning
* * * * * Every minute
*/5 * * * * Every five minutes: at minutes 0, 5, 10, and so on within each hour
0 2 * * * At 2:00 a.m. every day
0 9 * * 1-5 At 9:00 a.m. Monday through Friday
15 14 1 * * At 2:15 p.m. on the first day of each month
30 4 1,15 * 5 At 4:30 a.m. on the 1st and 15th of each month, and every Friday

Why can a cron job run on either of two days?

In Cronie, when both the day-of-month and day-of-week fields are restricted (not *), either field matching is enough. The minute, hour, and month fields must still match. This is OR behavior between the two day fields, not AND behavior.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

That rule explains 30 4 1,15 * 5: it matches at 4:30 a.m. on the 1st or 15th of a month, or on any Friday. It does not mean only Fridays that fall on the 1st or 15th. POSIX and Cronie’s documentation describe this day-field interaction; check the target scheduler’s own specification before relying on it.

Rank #3
Scheduler Funny Job Title Worker American Flag Scheduler T-Shirt
  • Funny Scheduler American Flag Design For Men And Women
  • Lightweight, Classic fit, Double-needle sleeve and bottom hem

What can change when a schedule runs?

Cronie’s crontab(5) documentation says, “cron(8) examines cron entries every minute.” Its behavior around daylight-saving transitions depends on local wall-clock time: a scheduled time that does not exist during the spring clock change does not match, while a repeated time during the fall change can match twice.

Cronie also provides CRON_TZ to set the schedule’s timezone. Log timestamps, however, use the daemon’s local timezone. Treat these as Cronie-specific details rather than universal behavior for every service called cron.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Is every cron expression five fields?

No. “Cron expression” is also used by cloud schedulers and software libraries with different field counts, ranges, timezone defaults, and special characters. A valid expression in one system may be rejected or interpreted differently in another.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Scheduler or format Documented schedule form Difference to check
POSIX and Cronie crontab Five schedule fields Traditional minute-through-weekday order; consult the relevant specification for details.
AWS CloudWatch recurring schedule cron(Minutes Hours Day-of-month Month Day-of-week) AWS documents UTC when no timezone is specified and supports named timezone identifiers as an option. See the AWS scheduled events reference.
Apache Log4j Six required fields, with an optional year Includes seconds and documents special characters such as ?, L, W, and #, which are not part of the basic POSIX field description. See the Log4j cron schedule reference.

Before copying a schedule, identify the scheduler and check its own documentation for the number and order of fields, weekday numbering, special characters, timezone rules, and how day-of-month interacts with day-of-week. In particular, do not paste a six-field expression into a five-field Unix crontab or assume a cloud schedule uses the host’s local time.

Quick Recap

Bestseller No. 2
Funny Planner Scheduler Job Title T-Shirt, Men, Black, Small
Funny Planner Scheduler Job Title T-Shirt, Men, Black, Small
Lightweight, Classic fit, Double-needle sleeve and bottom hem
$19.99
Bestseller No. 3
Scheduler Funny Job Title Worker American Flag Scheduler T-Shirt
Scheduler Funny Job Title Worker American Flag Scheduler T-Shirt
Funny Scheduler American Flag Design For Men And Women; Lightweight, Classic fit, Double-needle sleeve and bottom hem
$19.98

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.