home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
TOP
/
USR
/
SRC
/
vcron.t.Z
/
vcron.t
/
VCRON
/
MAN
/
crontab2.man
< prev
next >
Wrap
Text File
|
1988-11-15
|
5KB
|
200 lines
CRONTAB(5) UNIX 5.0 (19 March 1987) CRONTAB(5)
NAME
crontab - tables for driving Vixie's Cron
DESCRIPTION
A crontab file contains instructions to the crond(8) daemon
of the general form: "run this command at this time on this
date". Each user has their own crontab, and commands in any
given crontab will be executed as the user who owns the
crontab. Uucp and News will usually have their own
crontabs, eliminating the need for explicitly running "su
news" as part of a cron command.
Blank lines and leading spaces and tabs are ignored. Lines
whose first non-space character is a number-sign (`#') are
comments, and are ignored. Note that comments are not
allowed on the same line as cron commands, since they will
be taken to be part of the command. Similarly, comments are
not allowed on the same line as environment variable
settings.
An active line in a crontab will be either an environment
setting or a cron command. An environment setting is of the
form,
name = value
where the spaces around the equal-sign (`=') are optional,
and any subsequent spaces in value will be part of the value
assigned to name. The value string may be placed in quotes
(single or double, but matching) to preserve leading or
trailing blanks.
Several environment variables are set up automatically by
the crond(8) daemon from the /etc/passwd line of the
crontab's owner: USER, HOME, and SHELL. HOME and SHELL may
be overridden by settings in the crontab; USER may not.
(Note: for UUCP, always set SHELL=/bin/sh, or crond(8) will
cheerfully try to execute your commands using
/usr/lib/uucp/uucico.)
(Another note: the USER variable is sometimes called LOGNAME
or worse on System V... on these systems, you should set
LOGNAME rather than USER.)
In addition to USER, HOME, and SHELL, crond(8) will look at
MAILTO if it has any reason to send mail as a result of
running commands in "this" crontab. If MAILTO is defined
(and non-empty), mail is sent to the user so named. If
MAILTO is defined but empty (MAILTO=""), no mail will be
sent. Otherwise mail is sent to the owner of the crontab.
This option is useful if you decide on /bin/mail instead of
Page 1 (printed 2/10/88)
CRONTAB(5) UNIX 5.0 (19 March 1987) CRONTAB(5)
/usr/lib/sendmail as your mailer when you install cron --
/bin/mail doesn't do aliasing, and UUCP usually doesn't read
its mail.
The format of a cron command is very much the V7 standard,
with a number of extensions. Each line has five time and
date fields, followed by a command. The time and date
fields are: minute, hour, day of month, month, and day of
week. Lists and/or ranges are allowed, as in "1-3,7-9"; a
step value is also allowed, so that if you want to run a
command every two hours, you can say "0-23/2" instead of
listing every second hour. Months or days of the week may
be specified by name, using the first three letters of the
name. Numerics are also allowed for this, but this is
mostly a backward-compatibility issue -- names are nicer.
Spaces or tabs subsequent to the one that seperates the last
time/date field from the command are considered part of the
command. Percent-signs (`%') in the command, unless escaped
with backslash (`\'), will be changed into newline
characters, and all data after the first `%' will be sent to
the command as standard input.
EXAMPLES
# use /bin/sh to run commands, no matter what /etc/passwd says
SHELL=/bin/sh
# mail any output to `paul', no matter whose crontab this is
MAILTO=paul
#
5 0 * * * echo "run five minutes after midnight, every day"
15 14 1 * * echo "run at 2:15pm on the first of every month"
23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday"
5 4 * * sun echo "run at 5 after 4 every sunday"
SEE ALSO
Crond(8), crontab(1)
EXTENSIONS
When specifying day of week, both day 0 and day 7 will be
considered Sunday. Berkeley and ATT seem to disagree about
this.
Lists and ranges are allowed to co-exist in the same field.
"1-3,7-9" would be rejected by ATT or BSD cron -- they want
to see "1-3" or "7,8,9" ONLY.
Ranges can include "steps", so "1-9/2" is the same as
"1,3,5,7,9".
Names of months or days of the week can be specified by
name.
Page 2 (printed 2/10/88)
CRONTAB(5) UNIX 5.0 (19 March 1987) CRONTAB(5)
Environment variables can be set in the crontab. In BSD or
ATT, the environment handed to child processes is basically
the one from /etc/rc.
Command output is mailed to the crontab owner (BSD can't do
this), can be mailed to a person other than the crontab
owner (SysV can't do this), or the feature can be turned off
and no mail will be sent at all (SysV can't do this either).
AUTHOR
Paul Vixie
ucbvax!dual!ptsfa!vixie!paul
ptsfa!vixie!paul@ames.ARPA
Page 3 (printed 2/10/88)