Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/cron/crontab/crontab.5
Show All 11 Lines | |||||
.\" * | .\" * | ||||
.\" * Send bug reports, bug fixes, enhancements, requests, flames, etc., and | .\" * Send bug reports, bug fixes, enhancements, requests, flames, etc., and | ||||
.\" * I'll try to keep a version up to date. I can be reached as follows: | .\" * I'll try to keep a version up to date. I can be reached as follows: | ||||
.\" * Paul Vixie <paul@vix.com> uunet!decwrl!vixie!paul | .\" * Paul Vixie <paul@vix.com> uunet!decwrl!vixie!paul | ||||
.\" */ | .\" */ | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd January 19, 2020 | .Dd March 29, 2020 | ||||
.Dt CRONTAB 5 | .Dt CRONTAB 5 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm crontab | .Nm crontab | ||||
.Nd tables for driving cron | .Nd tables for driving cron | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
A | A | ||||
.Nm | .Nm | ||||
Show All 38 Lines | |||||
.Pp | .Pp | ||||
Several environment variables are set up | Several environment variables are set up | ||||
automatically by the | automatically by the | ||||
.Xr cron 8 | .Xr cron 8 | ||||
daemon. | daemon. | ||||
.Ev SHELL | .Ev SHELL | ||||
is set to | is set to | ||||
.Pa /bin/sh , | .Pa /bin/sh , | ||||
.Ev PATH | |||||
is set to | |||||
.Pa /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin , | |||||
and | and | ||||
.Ev LOGNAME | .Ev LOGNAME | ||||
and | and | ||||
.Ev HOME | .Ev HOME | ||||
are set from the | are set from the | ||||
.Pa /etc/passwd | .Pa /etc/passwd | ||||
line of the crontab's owner. | line of the crontab's owner. | ||||
In addition, the environment variables of the | In addition, the environment variables of the | ||||
user's login class, with the exception of | user's login class will be set from | ||||
.Ev PATH , | |||||
will be set from | |||||
.Pa /etc/login.conf.db | .Pa /etc/login.conf.db | ||||
and | and | ||||
.Pa ~/.login_conf . | .Pa ~/.login_conf . | ||||
(A setting of | |||||
.Ev HOME | |||||
in the login class will override the value from | |||||
.Pa /etc/passwd , | |||||
but will not change the current directory when the command is | |||||
invoked, which can only be overridden with an explicit setting of | |||||
.Ev HOME | |||||
within the crontab file itself.) | |||||
If | |||||
.Ev PATH | |||||
is not set by any other means, it is defaulted to | |||||
.Pa /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin . | |||||
.Ev HOME , | .Ev HOME , | ||||
.Ev PATH | .Ev PATH | ||||
and | and | ||||
.Ev SHELL , | .Ev SHELL , | ||||
and any variables set from the login class, | and any variables set from the login class, | ||||
may be overridden by settings in the crontab; | may be overridden by settings in the crontab; | ||||
.Ev LOGNAME | .Ev LOGNAME | ||||
may not. | may not. | ||||
.Pp | .Pp | ||||
(Another note: the | (Another note: the | ||||
.Ev LOGNAME | .Ev LOGNAME | ||||
variable is sometimes called | variable is sometimes called | ||||
.Ev USER | .Ev USER | ||||
on | on | ||||
.Bx | .Bx | ||||
systems... | systems... | ||||
On these systems, | On these systems, | ||||
.Ev USER | .Ev USER | ||||
will be set also). | will be set also). | ||||
.Pp | .Pp | ||||
In addition to | If | ||||
.Ev LOGNAME , | |||||
.Ev HOME , | |||||
.Ev PATH , | |||||
and | |||||
.Ev SHELL , | |||||
.Xr cron 8 | .Xr cron 8 | ||||
will look at | has any reason to send mail as a result of running commands in | ||||
.Ev MAILTO | ``this'' crontab, it will respect the following settings which may be | ||||
if it has any reason to send mail as a result of running | defined in the crontab (but which are not taken from the login class). | ||||
commands in ``this'' crontab. | |||||
If | If | ||||
.Ev MAILTO | .Ev MAILTO | ||||
is defined (and non-empty), mail is | is defined (and non-empty), mail is | ||||
sent to the user so named. | sent to the user so named. | ||||
If | If | ||||
.Ev MAILFROM | .Ev MAILFROM | ||||
is defined (and non-empty), its value will be used as the from address. | is defined (and non-empty), its value will be used as the from address. | ||||
.Ev MAILTO | .Ev MAILTO | ||||
▲ Show 20 Lines • Show All 251 Lines • Show Last 20 Lines |