Know your terminology
Crontab vs cron expression: what's the difference?
Crontab is the file where you list scheduled jobs. A cron expression is the five-field string inside that file that says when a job should run. They are different things that work together.
0 9 * * 1 /home/me/backup.sh The five fields on the left form the cron expression; the rest is the command. Read this exact Monday-morning schedule in detail.
What is crontab?
crontab is both a command and the file it manages. Running
crontab -e opens your user's crontab in an editor; crontab -l
prints it. Each non-comment line in that file describes one scheduled job and has three parts: an optional
environment assignment (like PATH=/usr/bin:/bin), the five-field cron expression,
and the command to execute. The cron daemon reads these files when the system starts and watches them for changes.
Files under /etc/cron.d/, /etc/cron.hourly/,
/etc/cron.daily/ and friends are also crontabs in the broad sense — same line
format, different management location. So when someone says “add a crontab entry,” they mean “add one line
containing an expression plus a command.”
What is a cron expression?
A cron expression is the schedule itself: five space-separated fields —
minute, hour, day of month, month, day of week. It says when but never what.
The expression 0 9 * * 1 means “at 9:00 AM on Monday”; the command next to it is
the work to do. Expressions also appear outside crontabs — in CI pipelines, Kubernetes CronJob
specs, AWS Lambda event rules and libraries like Node-cron or Quartz. The complete guide
covers every field and operator.
Side by side
| Crontab | Cron expression | |
|---|---|---|
| What it is | A file (or the command to edit it) | A five-field schedule string |
| Job | Holds one or more job lines | Describes when one job runs |
| Contents | Expressions + commands + env vars | Numbers and operators only |
| Example | crontab -e | */5 * * * * |
| Where used | Unix/Linux/macOS schedulers | Cron daemons and many cloud schedulers |
Common points of confusion
People mix the two terms because a single crontab line contains both. A job is not “a cron” — it is a command paired with an expression. Editing a crontab does not change how expressions are evaluated; the daemon evaluates the same five-field rules for every file. Likewise, an expression has no memory of the job: the exact same string appears in thousands of crontabs and means the same thing everywhere.
Testing is a third concept people often bundle in: after you write an entry, you cannot run
crontab to “test” the expression. You preview it instead. The tool on this
site does exactly that — paste any expression and it prints the next run times, as shown below for a weekday
schedule.
See the schedule in action
Preview the next five runs for a typical weekday crontab expression, computed live in your browser:
Next 5 run times: 0 9 * * 1-5
- your local time
- your local time
- your local time
- your local time
- your local time
Compare related patterns to see how the expression changes with intent:
daily at midnight,
every Monday and
weekdays only. For the full field reference, including the
*, /, - and
, operators, read the complete guide to cron syntax —
or go straight to the cron expression builder and generate your own.