Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cron(1M) — UNIX System III

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sh(1)

init(8)

CRON(1M)  —  UNIX 3.0

NAME

cron − clock daemon

SYNOPSIS

/etc/cron

DESCRIPTION

Cron executes commands at specified dates and times according to the instructions in the file /usr/lib/crontab.  Because cron never exits, it should be executed only once.  This is best done by running cron from the initialization process through the file /etc/rc (see init(8)).

The file crontab consists of lines of six fields each.  The fields are separated by spaces or tabs.  The first five are integer patterns that specify the minute (0-59), hour (0-23), day of the month (1-31), month of the year (1-12), and day of the week (0-6, with 0=Sunday).  Each of these patterns may contain:

a number in the (respective) range indicated above;
two numbers separated by a minus (indicating an inclusive range);
a list of numbers separated by commas (meaning all of these numbers); or
an asterisk (meaning all legal values).

The sixth field is a string that is executed by the shell at the specified time(s).  A % in this field is translated into a new-line character.  Only the first line (up to a % or the end of line) of the command field is executed by the shell.  The other lines are made available to the command as standard input. 

Cron examines crontab once a minute to see if it has changed; if it has, cron reads it.  Thus it takes only a minute for entries to become effective. 

FILES

/usr/lib/crontab
/usr/lib/cronlog

SEE ALSO

sh(1), init(8). 

DIAGNOSTICS

A history of all actions by cron are recorded in /usr/lib/cronlog. 

BUGS

Cron reads crontab only when it has changed, but it reads the in-core version of that table once a minute.  A more efficient algorithm could be used.  The overhead in running cron is about one percent of the CPU, exclusive of any commands executed by cron.

May 16, 1980

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026