1997-08-12 17:48:49 +00:00
|
|
|
.\" Copyright (c) 1997 FreeBSD, Inc.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
1999-08-28 01:35:59 +00:00
|
|
|
.\" $FreeBSD$
|
1997-08-12 17:48:49 +00:00
|
|
|
.\"
|
1997-08-13 16:27:59 +00:00
|
|
|
.Dd 13 August 1997
|
1997-08-12 17:48:49 +00:00
|
|
|
.Os FreeBSD 3.0
|
1997-08-13 16:27:59 +00:00
|
|
|
.Dt PERIODIC 8
|
1997-08-12 17:48:49 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm periodic
|
1997-08-13 16:27:59 +00:00
|
|
|
.Nd
|
|
|
|
run periodic system functions
|
1997-08-12 17:48:49 +00:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm periodic
|
1997-08-13 06:02:18 +00:00
|
|
|
.Ao
|
|
|
|
.Cm daily | weekly | monthly |
|
|
|
|
.Ar path Op path ...
|
|
|
|
.Ac
|
1997-08-12 17:48:49 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
program is intended to be called by cron(8) to execute shell scripts
|
|
|
|
located in the specified directory.
|
|
|
|
.Pp
|
1997-08-13 06:02:18 +00:00
|
|
|
One, and only one, of the following arguments should be specified:
|
1997-08-12 17:48:49 +00:00
|
|
|
.Bl -tag -width Fl
|
1997-08-13 06:02:18 +00:00
|
|
|
.It Cm daily
|
|
|
|
Perform the standard daily periodic executable run.
|
|
|
|
This usually occurs early in the morning (local time).
|
|
|
|
.It Cm weekly
|
|
|
|
Perform the standard weekly periodic executable run.
|
|
|
|
This usually occurs on Sunday mornings.
|
|
|
|
.It Cm monthly
|
|
|
|
Perform the standard monthly periodic executable run.
|
|
|
|
This usually occurs on the first day of the month.
|
1997-08-12 17:48:49 +00:00
|
|
|
.It Ar path
|
1997-08-13 06:02:18 +00:00
|
|
|
An absolute path to a directory containing a set of executables to be run.
|
1997-08-12 17:48:49 +00:00
|
|
|
.El
|
1997-08-13 06:02:18 +00:00
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
program will run each executable file in the directory or directories
|
|
|
|
specified. If a file does not have the executable bit set, it will be
|
|
|
|
ignored silently.
|
1997-08-12 17:48:49 +00:00
|
|
|
.Sh ENVIRONMENT
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command sets the
|
|
|
|
.Ev PATH
|
1997-08-13 06:02:18 +00:00
|
|
|
environment to include all standard system directories, but no additional
|
|
|
|
directories, such as
|
|
|
|
.Pa /usr/local/bin .
|
|
|
|
If executables are added which depend upon other path components, each
|
|
|
|
executable must be responsible for configuring its own appropriate environment.
|
1997-08-12 17:48:49 +00:00
|
|
|
.Sh FILES
|
1997-08-16 17:08:35 +00:00
|
|
|
.Bl -tag -width /etc/periodic
|
1997-08-12 17:48:49 +00:00
|
|
|
.It Pa /etc/crontab
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
program is typically called via entries in the system default cron table.
|
1997-08-16 17:08:35 +00:00
|
|
|
.It Pa /etc/periodic
|
1997-08-13 06:02:18 +00:00
|
|
|
The top level directory containing
|
|
|
|
.Pa daily ,
|
|
|
|
.Pa weekly ,
|
|
|
|
and
|
|
|
|
.Pa monthly
|
|
|
|
subdirectories which contain standard system periodic executables.
|
2000-06-23 01:18:31 +00:00
|
|
|
.It Pa /etc/defaults/periodic.conf
|
1997-08-13 06:02:18 +00:00
|
|
|
The
|
2000-06-23 01:18:31 +00:00
|
|
|
.Pa periodic.conf
|
1997-08-13 06:02:18 +00:00
|
|
|
system registry contains a variable
|
1997-08-19 16:49:35 +00:00
|
|
|
.Va local_periodic
|
1997-08-13 06:02:18 +00:00
|
|
|
which may be configured to specify additional top level standard
|
|
|
|
periodic directories, such as
|
1997-08-16 17:08:35 +00:00
|
|
|
.Pa /usr/local/etc/periodic
|
1997-08-13 06:02:18 +00:00
|
|
|
and
|
1997-08-16 17:08:35 +00:00
|
|
|
.Pa /usr/X11R6/etc/periodic .
|
1997-08-12 17:48:49 +00:00
|
|
|
.El
|
|
|
|
.Sh EXAMPLES
|
|
|
|
The system crontab should have entries for
|
|
|
|
.Nm
|
|
|
|
similar to the following example:
|
|
|
|
.Pp
|
|
|
|
.Dl # do daily/weekly/monthly maintenance
|
|
|
|
.Dl 0 2 * * * root periodic daily 2>&1
|
|
|
|
.Dl 0 3 * * 6 root periodic weekly 2>&1
|
|
|
|
.Dl 0 5 1 * * root periodic monthly 2>&1
|
1997-08-13 06:02:18 +00:00
|
|
|
.Pp
|
2000-06-23 01:18:31 +00:00
|
|
|
Additionally, the
|
|
|
|
.Pa /etc/defaults/periodic.conf
|
|
|
|
system registry will typically have a
|
1999-04-23 18:26:55 +00:00
|
|
|
.Va local_periodic
|
1997-08-13 06:02:18 +00:00
|
|
|
variable reading:
|
2000-06-23 01:18:31 +00:00
|
|
|
.Pp
|
|
|
|
.Dl local_periodic="/usr/local/etc/periodic /usr/X11R6/etc/periodic"
|
1997-08-12 17:48:49 +00:00
|
|
|
.Sh SEE ALSO
|
1997-09-29 19:11:55 +00:00
|
|
|
.Xr sh 1 ,
|
1997-08-12 17:48:49 +00:00
|
|
|
.Xr crontab 5 ,
|
2000-06-23 01:18:31 +00:00
|
|
|
.Xr periodic.conf 5 ,
|
1997-09-29 19:11:55 +00:00
|
|
|
.Xr cron 8
|
1997-08-12 17:48:49 +00:00
|
|
|
.Rs
|
|
|
|
.Sh DIAGNOSTICS
|
1998-12-29 22:45:15 +00:00
|
|
|
Exit status is 0 on success and 1 if the command
|
1997-08-12 17:48:49 +00:00
|
|
|
fails for one of the following reasons:
|
|
|
|
.Bl -diag
|
|
|
|
.It usage: periodic <directory of files to execute>
|
|
|
|
No directory path argument was passed to
|
|
|
|
.Nm
|
|
|
|
to specify where the script fragments reside.
|
|
|
|
.It <directory> not found
|
|
|
|
Self explanatory.
|
|
|
|
.El
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
program first appeared in
|
|
|
|
.Fx 3.0 .
|
1998-03-23 08:31:20 +00:00
|
|
|
.Sh AUTHORS
|
|
|
|
.An Paul Traina Aq pst@FreeBSD.org
|