LLMpediaThe first transparent, open encyclopedia generated by LLMs

cron (software)

Generated by GPT-5-mini
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: Progressive Web Apps Hop 3
Expansion Funnel Raw 82 → Dedup 17 → NER 12 → Enqueued 10
1. Extracted82
2. After dedup17 (None)
3. After NER12 (None)
Rejected: 5 (not NE: 5)
4. Enqueued10 (None)
Similarity rejected: 2
cron (software)
Namecron
DeveloperKen Thompson, AT&T Bell Labs, Paul Vixie
Released1975
Programming languageC (programming language)
Operating systemUnix, Unix-like
GenreJob scheduler, Daemon (computing)
LicenseBSD license, ISC license

cron (software) is a time-based job scheduler daemon originally developed for Unix systems that runs commands or scripts at specified times and dates. It traces roots to early Unix v7 work by Ken Thompson and later evolved through implementations by Paul Vixie and others, becoming a standard component of many Unix-like operating systems such as Linux, BSD (operating system family), and macOS. cron coordinates with system facilities like init (system) and systemd to manage recurring maintenance, backups, and administrative automation.

History

Developed in the mid-1970s within AT&T Bell Labs alongside other Unix utilities, cron's conceptual origins coincide with the growth of batch processing and scheduled tasks on mainframes such as UNIVAC and IBM System/360. Early implementations appeared in Unix v7 and were formalized in later research and distribution work by developers including Paul Vixie, whose widely used Vixie cron implementation influenced distributions such as Debian, Red Hat, and FreeBSD. Throughout the 1980s and 1990s cron adapted to changes in POSIX standards and cross-platform portability, while modern successors and alternatives emerged in projects including systemd, anacron, and proprietary schedulers used by Google, Amazon (company), and Microsoft.

Design and implementation

cron runs as a background daemon process, typically invoked by init (system) scripts or managed by systemd units, and repeatedly wakes to examine timestamped entries. Its architecture separates a scheduling engine from per-user configuration files and uses process management facilities provided by POSIX APIs and the fork (system call)/exec (operating system) model to spawn jobs. Implementations often include support for job queues, logging via syslog, and environment handling influenced by POSIX.1-2008. Performance and scalability considerations led to variations optimized for high-throughput systems at organizations such as Google, Facebook, and research projects at MIT and Carnegie Mellon University.

Configuration and crontab format

Job definitions are stored in crontab files edited with utilities such as crontab(1). Each user may have a personal crontab, and system-wide crontabs are located in directories managed by Linux Standard Base conventions and distribution-specific policies from Debian Project or Red Hat, Inc.. The crontab format comprises fields for minute, hour, day of month, month, and day of week followed by the command, with optional mail and environment declarations. Administrative control is governed by files such as /etc/cron.allow and /etc/cron.deny influenced by Filesystem Hierarchy Standard practices and permission semantics from POSIX ACLs and Unix file permissions.

Scheduling syntax and examples

The scheduling syntax uses five time-and-date fields plus a command; special strings like @reboot, @daily, @weekly are widely supported by implementations descended from Vixie cron. Example entries demonstrate common tasks: system backups coordinated with rsync, periodic log rotation using logrotate, and certificate renewal with Let's Encrypt client tools. Advanced use cases combine cron with tools such as bash (Unix shell), python (programming language), and Perl scripts, while integration with cron.d drop-in files enables packaged jobs from projects like Postfix, MySQL, and Docker maintenance containers.

Variants and compatible implementations

Notable implementations and compatible schedulers include Vixie cron, anacron for systems that are not always running (originating from Ubuntu and Debian use-cases), cronie used by Fedora Project and Red Hat, fcron for flexible scheduling, and systemd timers introduced by systemd developers. Enterprise and cloud vendors provide alternatives such as Apache Airflow, HashiCorp Nomad, and managed services from Amazon Web Services, Google Cloud Platform, and Microsoft Azure for workflow orchestration. Research-grade and historical variants appear in academic work at Bell Labs, University of California, Berkeley, and MIT.

Security and permissions

cron interacts with multiuser security models defined by POSIX, Open Group, and distribution-specific policies maintained by organizations like the Debian Project and FreeBSD Foundation. Access control uses crontab ownership, /etc/cron.allow and /etc/cron.deny, and file permissions subject to Unix file permissions and POSIX ACLs. Vulnerabilities historically include shell injection, environment manipulation, and improper privilege separation; mitigations draw on secure coding guidelines from CERT Coordination Center and access management best practices from National Institute of Standards and Technology. Logging and auditing integrate with syslog, auditd and centralized logging stacks such as ELK Stack and Splunk for forensic analysis.

Usage and administration

Administrators manage cron jobs via crontab(1), distribution packaging tools such as apt (software), rpm (file format), and configuration management systems like Ansible, Puppet (software), Chef (software), and SaltStack. Best practices include versioning crontab snippets in Git, testing scheduled commands in shell, coordinating with system services using systemctl when applicable, and monitoring execution with Nagios, Prometheus, or Zabbix. Scaling cron-driven workflows may involve migration to workflow engines like Apache Airflow or orchestration with Kubernetes and Nomad for containerized environments.

Category:Unix daemons