crontab.1 (2010 09)

c
crontab(1) crontab(1)
NAME
crontab - user job file scheduler
SYNOPSIS
crontab [file]
crontab -e [username ]
crontab -l [username ]
crontab -r [username ]
DESCRIPTION
The
crontab command manages a crontab file for the user. You can use a crontab file to schedule jobs
that are executed automatically by
cron (see cron (1M)) on a regular basis. The command has four
forms:
crontab [file] Create or replace your crontab file by copying the specified file ,orstandard
input if file is omitted or
-
is specified as file, into the crontab directory,
/var/spool/cron/crontabs
. The name of your crontab file in the
crontab directory is the same as your effective user name. If the compart-
mentalization feature is enabled, crontab file may contain compartment
information.
crontab -e [username]
Edit a copy of the user’s crontab file, or create an empty file to edit if the
crontab file does not exist. When editing is complete, the file will be copied
into the crontab directory as the user’s crontab file. If the compartmentali-
zation feature is enabled, it only edits a copy of the user’s crontab file from
the compartment that the crontab files were created from.
crontab -l [username]
Lists the user’s crontab file. If the compartmentalization feature is
enabled, it only lists the crontab files from the compartment that the cron-
tab files were created from.
crontab -r [username]
Remove the user’s crontab file from the crontab directory. If the compart-
mentalization feature is enabled, it only removes the crontab files from the
compartment that the crontab files were created from.
Only a privileged user can use username following the
-e, -l,or-r options, to edit, list, or remove the
crontab file of the specified user.
The entries in a crontab file are lines of six fields each. The fields are separated by spaces or tabs. The
lines have the following format:
minute hour monthday month weekday command
The first five are integer patterns that specify when the sixth field, command, should be executed. They
can have the following ranges of values:
minute The minute of the hour,
059
hour The hour of the day, 023
monthday The day of the month, 131
month The month of the year, 112
weekday The day of the week, 0 6, 0=Sunday
Each pattern can be either an asterisk (
*), meaning all legal values, or a list of elements separated by
commas. An element is either a number in the ranges shown above, or two numbers in the range
separated by a hyphen (meaning an inclusive range). Note that the specification of days can be made in
two fields: monthday and weekday . If both are specified in an entry, they are cumulative. For example,
001,15*1command
runs command at midnight on the first and fifteenth of each month, as well as every Monday. To specify
days in only one field, set the other field to asterisk (
*). For example,
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (4 pages)