Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ crontab(5) — Ultrix WS 2.0 VAX

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cron(8)

crontab(5)

NAME

crontab − clock daemon table file

SYNTAX

/usr/lib/crontab

DESCRIPTION

The cron command executes at specified dates and times according to the instructions in the /usr/lib/crontab file. The crontab file consists of lines with six fields each. The format for a line is as follows:

minute hour day month weekday command

where:

minute (0-59)The exact minute that the command sequence executes. 

hour (0-23)The hour of the day that the command sequence executes. 

day (1-31)The day of the month that the command sequence executes. 

month (1-12)The month of the year that the command sequence executes. 

weekday (1-7)The day of the week that the command sequence executes. Monday = 1, Tuesday = 2, and so forth. 

commandThe complete command sequence variable that is to be executed. 

The first five integer fields may be specified as follows:

•A single number in the specified range

•Two numbers separated by a minus meaning a range inclusive

•A list of numbers separated by commas meaning any of the numbers

•An asterisk meaning all legal values

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

EXAMPLES

The following example is part of a crontab file:

# periodic things
0,15,30,45 * * * * (echo ’’ ‘date‘; echo ’ ’) >/dev/console
0,15,30,45 * * * * /usr/lib/atrun
 # daily stuff
5 4 * * * sh /usr/adm/newsyslog
15 4 * * * find /usr/preserve -mtime +7 -a -exec rm -f {} ;
20 4 * * * find /usr/msgs -mtime +21 -a ! -perm 444 -a ! -name bounds -a
                          -exec rm -f {} ;  NOTE: This line is wrapped.
 # local cleanups
30 4 * * * find /usr/spool/mqueue -type f -mtime +5 -name df-exec rm {} ;
35 4 * * * find /usr/spool/mqueue -type f -mtime +5 -name tf-exec rm {} ;
40 4 * * * find /usr/spool/rwho -type f -mtime +21 -exec rm {} ;
#

FILES

/etc/cron
/usr/lib/crontab

SEE ALSO

cron(8)
Guide to System Environment Setup

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