Technical Beauty ■ Episode 16
One loop. One file. Every minute. Since 1975. Terribly sorry if you expected something more exciting.
Ken Thompson wrote the first version of cron at Bell Labs. The algorithm was almost embarrassingly simple: wake up every minute, read a text file, execute what needs executing, go back to sleep.
That was fifty years ago. The algorithm has not changed. One might call that lazy. I call it finished.
Five Fields
In 1987, Paul Vixie rewrote cron for multi-user systems. He added the syntax that every sysadmin has typed at least once without consulting the manual, and then immediately consulted the manual:
0 3 * * * /usr/local/bin/backup.sh
Five fields. Minute, hour, day of month, month, day of week. A path. That is it. No YAML. No JSON. No "configuration as code" framework. Just text, in a file, parsed by a daemon that asks nothing of you except correct syntax.
The entire
Vixie cron
implementation: roughly 2,500 lines of C. Eleven source
files. No dependencies beyond libc. No build system beyond
make. The name comes from the Greek
chronos, meaning time. The daemon has been keeping
it reliably for half a century.
The Modern Alternative
You need to run a backup script at 3 AM. In 2026, the industry offers you options.
Kubernetes CronJobs. Which require: a container runtime, an orchestration layer, etcd for distributed state, YAML files longer than the job itself, and a team to maintain it all. Marvellous progress.
Apache Airflow. 500,000+ lines of Python. DAGs, executors, schedulers, metadata databases, web interfaces, plugins. For running a backup script at 3 AM. Splendid.
cron. A text file.
The Discipline of Knowing When to Stop
cron runs on 96% of the world's web servers. All 500 of the world's fastest supercomputers. Every FreeBSD, Linux, and macOS machine. It has done this for five decades without a rewrite, without a venture-funded pivot, without a conference talk about "next-generation scheduling."
I have been a FreeBSD administrator for over two decades. Every morning, cron runs my log rotation. Every night, my ZFS snapshots. Every Sunday, my off-site backups. It has never failed to wake up. It has never corrupted its state. It has never required a migration guide. It simply does its job, every minute, without complaint.
Rather British, come to think of it.
Some problems were solved correctly the first time. The beauty is not in the elegance of the code (though the code is elegant). It is in the decision, made fifty years ago and honoured every year since, that the algorithm was sufficient and nothing more needed adding.
The discipline is not in what you build. It is in knowing when to stop.