Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

User Commands (c) crontab(1)
Two numbers separated by a dash to indicate an inclusive range.
A list of numbers, separated by commas, which selects all numbers in the list.
An asterisk, meaning all legal values.
Note that days can be specied by two elds (day of the month and day of the week). If
you specify both as a list of elements, both are adhered to. For example, the following
entry:
0 0 1,15 * 1 command
would run command at midnight on the rst and fteenth days of each month, as well as
every Monday. To specify days by only one eld, the other eld should contain an *
(asterisk).
The cron program runs the command named in the sixth eld at the selected date and
time. If you include a % (percent sign) in the sixth eld, cron treats everything that pre-
cedes it (in that eld) as the command invocation, and makes all that follows it available
to the standard input le, unless you escape the percent sign (\%) or double quote it
("%"). A % (percent sign) in the sixth eld is translated to a newline character.
Note that the shell runs only the rst line of the command eld (up to a % or End-of-
Line). All other lines are made available to the command as the standard input le.
Note also that blank lines and lines whose rst nonblank character is # (pound sign) are
treated as comments and ignored by cron.
The cron program invokes a subshell from your $HOME directory. This means that it
will not run your .prole le. If you schedule a command to run when you are not
logged in and you want to have commands in your .prole run, you must explicitly do so
in the crontab le. (For a more detailed discussion of how sh can be invoked, see the sh
command.)
Environment Variables
The cron program supplies a default environment for every shell, dening HOME, LOGNAME,
SHELL (=/bin/sh), and PATH (=:/bin:/bin/unsupported:).
This command supports the use of the EDITOR, LANG, LC_ALL, LC_CTYPE,
LC_MESSAGES, and NLSPATH environment variables.
EXAMPLES
The following examples show valid crontab le entries.
a. To write the time to the le every hour on the hour, enter:
0****echo The hour is date.>/datele
This example uses command substitution. (For more information, see the sh
command.)
b. To run cal at 6:30 a.m. every Monday, Wednesday, and Friday, enter:
30 6 * * 1,3,5 cal > /calle
527188-003 Hewlett-Packard Company 275