Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
User Commands (c) crontab(1)
NAME
crontab - Submits a schedule of commands to cron
SYNOPSIS
crontab [file]
crontab -l | -v | -e
crontab -r
The crontab command copies the specified file, or the standard input file if you do not
specify a file, into a directory that holds all users’ crontab files. The cron command runs
commands according to the instructions in the crontab files.
FLAGS
-e Edits a copy of your crontab entry. If the crontab entry does not exist, cron-
tab creates an empty entry to edit. The -e flag invokes the editor specified by
the EDITOR environment variable, or it uses /bin/vi by default. crontab
installs the new entry when editing is complete.
-l Lists the contents of your crontab file.
-r Removes the crontab file from the crontab directory.
-v Displays the name of your crontab file and the date and time at which you sub-
mitted it using crontab.
DESCRIPTION
The crontab command replaces your crontab file, which is contained in the
/var/spool/cron/crontabs system directory, with the crontab file you specify. In your crontab
file you have to redirect the output to the standard output or standard error file.
You can use the crontab command if your login name appears in the /var/adm/cron/cron.allow
file. If that file does not exist, the crontab command checks the /var/adm/cron/cron.deny file to
determine if your login name should be denied access to crontab. The cron.allow and
cron.deny files contain one login name per line. If neither file exists, you can submit a job only
if you are operating with appropriate privileges.
Each crontab file entry consists of a line with six fields, separated by spaces and tabs, that con-
tain, respectively:
a. The minute (0 to 59) at which the command sequence executes.
b. The hour (0 to 23) of command execution.
c. The day of the month (1 to 31) of command execution.
d. The month of the year (1 to 12) of command execution.
e. The day of the week (0 to 6 for Sunday to Saturday) of command execution.
f. The shell command to be executed.
Each of these fields can contain:
• A number in the specified range.
527188-007 Hewlett-Packard Company 2−79