2009-08-26 17:00:38 +02:00
|
|
|
.\" -*- nroff -*-
|
|
|
|
.ds g \" empty
|
|
|
|
.ds G \" empty
|
|
|
|
.\" Like TP, but if specified indent is more than half
|
|
|
|
.\" the current line-length - indent, use the default indent.
|
|
|
|
.de Tp
|
|
|
|
.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
|
|
|
|
.el .TP "\\$1"
|
|
|
|
..
|
2022-08-05 23:04:39 +02:00
|
|
|
.TH RUN-PARTS 8 "05 Aug 2022" "Slackware Version 15.1"
|
2009-08-26 17:00:38 +02:00
|
|
|
.SH NAME
|
|
|
|
run-parts \- run scripts found in a directory
|
|
|
|
.SH SYNOPSIS
|
2022-08-05 23:04:39 +02:00
|
|
|
.B run-parts [ --list | --test ] <directory>
|
2009-08-26 17:00:38 +02:00
|
|
|
.LP
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.B run-parts
|
|
|
|
is a utility that will run scripts that are found in a directory. For example,
|
|
|
|
it might be useful to create an /etc/cron.daily directory and put scripts in
|
|
|
|
there for daily cron jobs. Then
|
|
|
|
.B run-parts
|
|
|
|
can be called once a day from root's crontab to run all the scripts found in
|
|
|
|
/etc/cron.daily:
|
|
|
|
|
|
|
|
40 4 * * * run-parts /etc/cron.daily
|
|
|
|
|
|
|
|
.B run-parts
|
|
|
|
automatically skips files with certain suffixes that are generally associated
|
|
|
|
with backup or extra files. Any file that ends in one of these will be silently
|
|
|
|
ignored: ~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp
|
2022-08-05 23:04:39 +02:00
|
|
|
|
|
|
|
The execution of files can be allowed or denied by creating file
|
|
|
|
.B jobs.allow
|
|
|
|
or
|
|
|
|
.B jobs.deny
|
|
|
|
which work similarly to other allow/deny config files. The file must be
|
|
|
|
created in the specified directory.
|
|
|
|
|
|
|
|
Randomization of jobs can be configured in the
|
|
|
|
.IR /etc/default/run-parts
|
|
|
|
file. To enable randomization of jobs, set the RANDOMIZE parameter to 1
|
|
|
|
and set the RANDOM parameter to an integer which determines a random
|
|
|
|
seed. Additionally, you may configure the RANDOMTIME parameter (again,
|
|
|
|
by specifying an integer) to provide an additional level of
|
|
|
|
randomization. Jobs are not randomized when the RANDOM and RANDOMTIME
|
|
|
|
parameters are set to 0. Values in these two parameters must be set to
|
|
|
|
1 or larger to provide a good enough randomization.
|
|
|
|
|
|
|
|
Randomization of cron jobs can be useful for shared networks, where
|
|
|
|
multiple cron jobs executed at once can cause spikes in traffic,
|
|
|
|
especially during daily jobs. With randomized jobs, the workload is
|
|
|
|
evenly distributed throughout the day.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B --list
|
|
|
|
print names of all files (not limited to executables), but don't run
|
|
|
|
them. This option can't be used with
|
|
|
|
.B test
|
|
|
|
option.
|
|
|
|
.TP
|
|
|
|
.B --test
|
|
|
|
print names of files, which would be run.
|
|
|
|
|
|
|
|
.SH EXAMPLE OF CONFIGURATION FILE
|
|
|
|
.nf
|
|
|
|
RANDOMIZE=1
|
|
|
|
RANDOM=4
|
|
|
|
RANDOMTIME=8
|
|
|
|
.fi
|
|
|
|
|
2009-08-26 17:00:38 +02:00
|
|
|
.SH AUTHOR
|
2022-08-05 23:04:39 +02:00
|
|
|
Written for Fedora by Marcela Ma■lá■ová, modified slightly for Slackware by
|
|
|
|
Patrick J. Volkerding <volkerdi@slackware.com>.
|
2009-08-26 17:00:38 +02:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR crond(8),
|
|
|
|
.BR crontab(8).
|