Cron is the time-based job scheduler built into Unix and Linux. A background daemon (crond) reads tables of scheduled commands called crontabs and runs each command when its time specification matches the current minute. It is the oldest and simplest scheduling tool in the toolkit, and for a single machine running a handful of periodic jobs - a nightly backup, a log rotation, a data pull every fifteen minutes - it is often all you need. Understanding cron also matters because nearly every higher-level orchestrator borrows its five-field schedule syntax.

The crontab format

Each crontab line is five time fields followed by the command. The fields are minute, hour, day-of-month, month, and day-of-week; an asterisk means "every," and step, range, and list syntax cover the rest.

# ┌── minute (0-59)
# │ ┌── hour (0-23)
# │ │ ┌── day of month (1-31)
# │ │ │ ┌── month (1-12)
# │ │ │ │ ┌── day of week (0-6, Sun=0)
# │ │ │ │ │
  0 2 * * *      /usr/local/bin/backup.sh          # 02:00 every day
  */15 * * * *   /opt/etl/pull.py >> /var/log/pull.log 2>&1
  30 6 * * 1     /opt/report/weekly.sh             # 06:30 every Monday

Edit a user's table with crontab -e and list it with crontab -l; system-wide jobs live in /etc/crontab and /etc/cron.d/. Always redirect output - cron mails it to the user otherwise, and a misconfigured mailer means lost logs.

What cron does and doesn't give you

Cron runs a command at a time. It has no concept of dependencies between jobs, no retries on failure, no backfill, no central view of what ran, and no alerting beyond emailing stdout. Each job is independent and fire-and-forget. The environment is minimal too - cron runs with a bare PATH and none of your shell profile, so jobs that work in your terminal fail under cron when they rely on environment variables or relative paths. The fixes are to use absolute paths and set variables explicitly at the top of the crontab.

Cron handlesCron does NOT handle
Time-based triggeringTask dependencies / DAGs
Per-user and system tablesAutomatic retries on failure
Minute-granularity schedulesBackfills or catch-up runs
Running any shell commandCentral monitoring and alerting

When to graduate to an orchestrator

Cron is the right tool until you need any of what it lacks. The moment jobs depend on each other, must retry, need backfilling, or you want one dashboard across dozens of machines, you've outgrown it. That's the threshold where teams move to Airflow, Prefect, or Dagster - all of which still express their schedules in cron syntax. For systemd-based hosts, systemd timers are a more observable single-machine alternative with logging through the journal.

Frequently asked questions

Why does my cron job fail when it works in the shell? Cron runs with a minimal environment - a short PATH, no profile, no aliases. Use absolute paths to binaries and files, and set any needed environment variables at the top of the crontab.

How do I see a job's output? Redirect it: command >> /var/log/job.log 2>&1. Without redirection, cron tries to email stdout/stderr to the job's user, which is usually lost on servers.

Can cron run jobs more often than once a minute? No - one minute is the finest granularity. For sub-minute schedules, run a loop inside the job or use a different scheduler.

What about timezone and daylight saving? Classic cron uses the system timezone; jobs scheduled during a DST transition may skip or repeat. Set CRON_TZ (where supported) or schedule in UTC to avoid the ambiguity.