Cloud & Software Development

Cron job

Also known as: cron task, scheduled cron job

A cron job is a command or script scheduled to run automatically at specific times or intervals on Unix-like systems such as Linux and macOS.

It's handled by a background service called cron and configured in a file called a crontab, using a compact five-part schedule format. Cron jobs run backups, clean up files, send reports, and renew certificates. While cron is simple and reliable, failed jobs often go unnoticed unless someone sets up alerts.

Cron job, explained at three levels

At home

A cron job is like setting a coffee maker's timer. A small helper program called cron runs quietly in the background and checks its schedule every minute. Each line on that schedule says when to run something, such as every night at 2 a.m., and what to do, such as copy your photos to a backup drive. When the time arrives, cron starts the task without anyone pressing a button.

At work

A cron job is a task scheduled to run automatically at set times on Linux or macOS servers, such as every night or every Monday morning. A background service called cron reads the schedule from a file called a crontab and starts each job on time. Businesses care because cron handles backups, reports, and certificate renewals without staff effort, but a failed job can go unnoticed for weeks unless someone monitors it.

Real-world examples

At home

Jerome runs a home server. He set a cron job to back up his photos to an external drive every night at 3 a.m.

At work

Nadia manages servers for a Toronto e-commerce firm. A cron job's silent failure stopped backups for weeks, so she added alerts for missed check-ins.

How it compares

featureCron jobWindows Task Scheduler
PlatformLinux, macOS, UnixWindows
SetupText file (crontab)Graphical app or PowerShell
TriggersTime-basedTime, login, events
Built inYesYes

Cron schedules tasks on Unix. Task Scheduler does it on Windows.

For analysts

In system documentation, I'd list every scheduled job, its owner, and what happens if it fails. Hidden cron jobs are a classic source of surprise outages.

History & origin

Cron appeared in Version 7 Unix in 1979, written by Ken Thompson, its name derived from 'chronos,' the Greek word for time. Paul Vixie rewrote it in 1987, and 'Vixie cron' became the basis for versions used on many Linux systems. Windows has an equivalent called Task Scheduler. Cloud platforms later offered cron-style schedulers, such as Kubernetes CronJobs and managed schedulers on AWS, Azure, and Google Cloud, and the cron schedule format became a universal language for timing tasks. In my view, cron is a lovely example of a simple tool lasting nearly half a century.