Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk5 min

Understanding Cron Jobs: How to Read and Write Schedules

Decode cron’s five time fields, build practical Linux schedules, avoid common timing mistakes, and validate jobs before relying on them.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A cron schedule has five fields—in order, minute, hour, day of month, month, and day of week—followed by the command to run. Read each field as a set of matching calendar values, not as a general elapsed-time timer. The examples below use the documented Linux cron syntax; other cron implementations may differ.

How to read the five cron fields

A standard user crontab entry follows this pattern:

As an Amazon Associate I earn from qualifying purchases.

minute hour day-of-month month day-of-week command

For example:

15 14 1 * * /path/to/monthly-task

In the documented Linux implementation, this runs at 14:15 on the first day of each month, using the cron daemon’s applicable local time context. The five fields use these ranges:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Field Position Linux range Meaning
Minute 1 0–59 Minute within the hour
Hour 2 0–23 Hour of the day
Day of month 3 1–31 Calendar day
Month 4 1–12 Calendar month
Day of week 5 0–7 Weekday; 0 and 7 both represent Sunday in this Linux implementation

POSIX defines weekday values as 0–6, with 0 for Sunday, so the Linux 7-for-Sunday extension should not be assumed to work everywhere. See the Linux crontab(5) manual and POSIX crontab specification.

User crontab versus system crontab

A user crontab contains the five time fields and command. A system crontab, such as /etc/crontab or a file in /etc/cron.d, inserts a username after the time fields:

minute hour day-of-month month day-of-week username command

Do not copy a system-crontab line into a user crontab unchanged: the extra username would be read as part of the command, not as a user field.

What cron operators mean

The operators choose values within an individual field:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Syntax Meaning Example use
* Every allowed value in that field * in the month field means every month
5 One value 5 in the minute field means minute 5
1,15 A list of values Days 1 and 15 of the month
8-11 An inclusive range Hours 8, 9, 10, and 11
*/2 Every second value across that field’s range Every other hour when used in the hour field

The documented Linux implementation also accepts month and weekday names. Check the target host’s manual if you need syntax that may vary among cron implementations.

Cron schedule examples

Schedule What it runs
0 22 * * 1-5 /path/to/weekday-task At 22:00 Monday through Friday
5 0 * * * /path/to/daily-task At 00:05 every day
0 */2 * * * /path/to/every-other-hour-task At the start of every other hour
30 4 1,15 * 5 /path/to-example At 04:30 on the 1st and 15th of each month, and on Fridays

In the last example, both day-of-month and day-of-week are restricted. The documented Linux implementation treats those two fields with OR-style matching: a match in either field is enough. It does not mean “only when the date is the 1st or 15th and it is also Friday.”

Why */5 is not always an elapsed interval

A step is evaluated within its field; it does not necessarily measure time elapsed since a previous run. For example, */35 in the minute field runs at minute 0 and minute 35 of every hour. The gap from 35 to the next hour’s 0 is 25 minutes, so it is not a repeating 35-minute elapsed interval.

Rank #3
New Job Notebook: A Guided Journal for the First 90 Days at a New Job — For Remote, Hybrid, & Office Employees, Gift for New Hires & College Grads, Onboarding & Onwards, Hardcover, A5 (5.8 × 8.3 in), 185 Pages, Grey
  • SAVES YOU TIME - Instead of getting a blank journal and trying to figure out how to set it up, New Job Notebook comes pre-designed with all the basic information you need to keep track of important information, tasks and goals related to your new job. Blank journals and notepads can get disorganized pretty quickly. This notebook provides designated sections and a table of contents that make it easy to refer back to.
  • STRUCTURED & ORGANIZED - This 185 page journal allows you to write down information at your own pace in a structured way. Comes with over 90 pages of guided & reflective prompts to help guide you in your first days, weeks and months in your new role as well as 70+ blank pages for additional notes! Extra features include an area to build your own glossary of your Company's Terminology & Acronyms, and a colored page edge index which highlights the different sections of your notebook.
  • DEVELOPED WITH EXPERIENCE - Skillfully designed by a Learning & Development Professional with over 20 years of company onboarding experience. Jessica Rivera has helped welcome (onboarded) thousands of new employees across multiple industries during her career - from hospitals to fintech and even with Disney Cruise Line! She developed this tool to help provide the guidance, structure and organization you need when starting a new job. Perfect for remote, hybrid, or office professionals!
  • HIGH QUALITY NOTEBOOK - This A5 size journal has a grey faux leather hardcover and is easy to carry around. It fits conveniently in your laptop bag or backpack. Features no bleed 120gsm paper, elastic band, one bookmark ribbon, full colored dot grid pages (that are numbered) and a lay flat design (sewn binding).

Use cron for calendar patterns such as “at these minutes of each hour” or “at this time each weekday.” If a task must recur after a fixed elapsed interval even across calendar boundaries, use a timer or application-level scheduling method suited to that requirement.

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

Write the command part safely

In the documented Linux implementation, cron runs commands through /bin/sh unless the crontab changes SHELL. The command portion ends at a newline or an unescaped percent sign (%). An unescaped percent becomes a newline, and text after the first percent is sent to the command’s standard input.

  • Use absolute paths for executables and files where appropriate; the job’s environment may not match your interactive shell.
  • Decide intentionally where standard output and errors should go, or configure mail handling with settings such as MAILTO.
  • Put comments on their own lines. A trailing inline comment is treated as part of the command.
  • End the crontab file with a newline.
  • Review settings such as SHELL, HOME, and MAILTO; their values can affect execution and output handling.

Environment details depend on the cron implementation and host configuration. The crontab(5) manual documents the Linux behavior described here.

Account for timezone and daylight-saving changes

A cron expression is interpreted in the daemon’s applicable time context, so identify the timezone that matters for the task. The Linux crontab manual says a scheduled local time that does not exist during the spring clock change does not match; a local time repeated during the autumn change can match twice. The cron daemon manual also describes special behavior for certain clock changes, including catch-up or duplicate avoidance for some jobs. These details are implementation- and schedule-dependent; do not assume every cron daemon handles clock changes identically. See the crontab(5) and cron(8) manuals.

For jobs with financial, operational, or user-visible effects, decide how a missed, repeated, or delayed run should be handled. A schedule alone does not define safe behavior for those cases.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Validate a schedule and deploy carefully

  1. Check the expression syntax. On the documented Linux crontab utility, run crontab -T to test syntax before installation.
  2. Check the intended calendar interpretation. On systemd systems, systemd-analyze calendar can validate and normalize a calendar expression.
  3. Test the command separately. Syntax checks do not prove that the command succeeds, has the required credentials, or behaves safely if runs overlap.
  4. Inspect output and logs after deployment. Confirm the job ran at the intended time and that its result is correct.

These checks answer different questions: a valid schedule can still launch a failing command. See the relevant crontab(5) and systemd.time(7) documentation.

When a systemd timer may fit better

On a systemd host, a .timer unit activates a corresponding unit, commonly a service. OnCalendar= expresses wall-clock calendar events; monotonic directives such as OnBootSec= and OnUnitActiveSec= express timing relative to boot or unit activation. Calendar and monotonic directives can be combined. Timer behavior also includes configured accuracy and handling for suspend and resume; consult the manuals for the systemd version installed on the host. See systemd.timer(5) and systemd.time(7).

Choose based on the host and the job’s operational needs rather than assuming one scheduler is universally better:

  • Host and supervision: Does the system use systemd, and do service-unit dependencies or supervision matter?
  • Timing model: Is this a wall-clock event, such as 02:00 on weekdays, or elapsed time since boot or a prior activation?
  • Calendar requirements: Does the schedule need explicit timezone handling, systemd calendar syntax, or catch-up behavior?
  • Failure and downtime behavior: What should happen after suspension, downtime, clock correction, or a long-running previous activation?

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.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

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
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

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.