Cron, crontab and cron job: three different things
| Word | What it is |
|---|---|
| cron | The background service (daemon) that runs scheduled commands. On Debian and Ubuntu it wakes up every minute and checks every stored crontab for jobs that are due. |
| crontab | Two things. The file that lists your scheduled jobs ("cron table"), and the command you use to edit it: crontab -e. |
| cron job | One line in a crontab: a schedule followed by the command to run. |
What a cron job looks like
# minute hour day-of-month month day-of-week command 30 2 * * * /home/alice/backup.sh
That line means "at 02:30 every day, run backup.sh". The five time fields are defined by POSIX:
| Field | Allowed values |
|---|---|
| Minute | 0-59 |
| Hour | 0-23 |
| Day of month | 1-31 |
| Month | 1-12 |
| Day of week | 0-6, 0 = Sunday (Debian, Ubuntu and cronie also accept 7 for Sunday, and names like mon) |
A * means "every value". You can list values (1,15), give ranges (9-17) and steps (*/5 = every 5th value). Paste any line into the cron translator to see it in plain English with the next run times.
Examples
| Schedule | Meaning |
|---|---|
*/5 * * * * | Every 5 minutes: how to |
0 * * * * | Every hour, on the hour: how to |
0 2 * * * | Every day at 2 AM: how to |
0 9 * * 1-5 | 9 AM, Monday to Friday: how to |
0 0 1 * * | Midnight on the 1st of every month |
@reboot | Once, when cron starts at boot (Linux cron): details |
More in the examples library and the cheat sheet.
The three crontab commands you need
crontab -e # edit your crontab (creates it if it doesn't exist) crontab -l # list your jobs crontab -r # remove your whole crontab
crontab -r deletes every job at once without asking. On Debian, Ubuntu and cronie-based systems (Fedora, RHEL), crontab -i -r asks for confirmation first. To delete one job instead, see how to edit a crontab.
Things that surprise people
- Output goes to email. Anything a job prints is mailed to the crontab's owner (or to
MAILTO). With no mail system installed it's thrown away. Redirect it to a file instead; see where cron logs go. - A tiny environment. Cron runs jobs with a minimal
PATH(/usr/bin:/binunless the crontab sets one), so commands that work in your terminal can fail with "command not found". Use full paths. More in cron environment variables. - Day fields are OR'd. If you set both day-of-month and day-of-week, the job runs when either matches.
0 0 1-7 * 1runs on the 1st to 7th and every Monday, not "the first Monday". See the first-Monday trap. %is special. An unescaped%in the command becomes a newline, sodate +%Fmust be writtendate +\%F.- Server time, not your time. Jobs run in the system's time zone. See cron time zones.
Where cron runs
| System | Cron |
|---|---|
| Debian, Ubuntu | Debian's cron (based on Paul Vixie's cron), service cron: set it up |
| Fedora, RHEL, Rocky, Alma, Amazon Linux, Arch | cronie (also based on Vixie cron), service crond |
| Alpine, many Docker images | BusyBox crond |
| macOS | cron is still included, but Apple recommends launchd: crontab on Mac |
| Windows | No cron; use Task Scheduler: cron on Windows |
Many other tools borrowed the cron format: Kubernetes CronJobs, GitHub Actions, Jenkins cron (with its H hash), AWS EventBridge and Quartz (both with extra fields). They differ in small but important ways; the cron dialect registry compares them side by side.
Is cron the right tool?
Cron is ideal for simple, single-machine jobs. It won't retry a failed job, won't run a job it missed while the machine was off (that's what anacron is for), and won't tell you when something fails unless you add monitoring. On systemd Linux, systemd timers cover those gaps.
Sources
Checked against these official manuals and source code. Last verified 18 November 2026.