214 lines
6.2 KiB
Groff
214 lines
6.2 KiB
Groff
.\" This manpage has been automatically generated by docbook2man
|
|
.\" from a DocBook document. This tool can be found at:
|
|
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
|
|
.\" Please send any bug reports, improvements, comments, patches,
|
|
.\" etc. to Steve Cheng <steve@ggi-project.org>.
|
|
.TH "FCRON" "8" "06 July 2014" "07/06/2014" ""
|
|
|
|
.SH NAME
|
|
fcron \- daemon to execute scheduled tasks
|
|
.SH SYNOPSIS
|
|
|
|
\fBfcron\fR [ \fB-c \fIfile\fB\fR ] [ \fB-d\fR ] [ \fB-b\fR ] [ \fB-s \fItime\fB\fR ] [ \fB-m \fInum\fB\fR ] [ \fB-q \fInum\fB\fR ]
|
|
|
|
|
|
\fBfcron\fR [ \fB-c \fIfile\fB\fR ] [ \fB-d\fR ] [ \fB-f\fR ] [ \fB-o\fR ] [ \fB-y\fR ] [ \fB-p \fIfile\fB\fR ] [ \fB-l \fItime\fB\fR ]
|
|
|
|
|
|
\fBfcron\fR [ \fB-n \fIdir\fB\fR ]
|
|
|
|
|
|
\fBfcron\fR [ \fB-h\fR ]
|
|
|
|
|
|
\fBfcron\fR [ \fB-V\fR ]
|
|
|
|
.SH "DESCRIPTION"
|
|
.PP
|
|
\fBFcron\fR should be started from \fI/etc/rc\fR or
|
|
\fI/etc/rc.local\fR\&. Unless the \fB-f\fR (or
|
|
\fB--foreground\fR) option is given, it will return immediately, so
|
|
you don't need to start it with '&'.
|
|
.PP
|
|
\fBFcron\fR loads users \fBfcrontab\fRs (see \fBfcrontab\fR(5)) files previously installed by
|
|
\fBfcrontab\fR (see \fBfcrontab\fR(1)). Then, \fBfcron\fR calculates the time
|
|
and date of each job's next execution, and determines how long it has to sleep,
|
|
and sleeps for this amount of time. When it wakes up, it checks all jobs loaded
|
|
and runs them if needed. When a job is executed, \fBfcron\fR forks, changes its user
|
|
and group permissions to match those of the user the job is being done for,
|
|
executes that job and mails the outputs to the user (this can be changed: see
|
|
\fBfcrontab\fR(5)).
|
|
.PP
|
|
Informative message about what \fBfcron\fR is doing are sent to
|
|
\fBsyslogd\fR(8) under facility \fBcron\fR,
|
|
priority \fBnotice\fR\&. Warning and error messages are sent
|
|
respectively at priority \fBwarning\fR and
|
|
\fBerror\fR\&.
|
|
.PP
|
|
.sp
|
|
.RS
|
|
.B "Note:"
|
|
\fBfcron\fR sleeps at least 20 seconds after it has been started before
|
|
executing a job to avoid to use too much resources during system boot.
|
|
.RE
|
|
.SH "OPTIONS"
|
|
.TP
|
|
\fB-f\fR
|
|
.TP
|
|
\fB--foreground\fR
|
|
Don't fork to the background. In this mode, \fBfcron\fR will
|
|
output informational message to standard error as well as to syslogd.
|
|
.TP
|
|
\fB-b\fR
|
|
.TP
|
|
\fB--background\fR
|
|
Force running in background, even if \fBfcron\fR has been
|
|
compiled to run in foreground as default.
|
|
.TP
|
|
\fB-s \fItime\fB\fR
|
|
.TP
|
|
\fB--savetime \fItime\fB\fR
|
|
Save \fBfcrontab\fRs on disk every
|
|
\fItime\fR sec (default is 1800).
|
|
.TP
|
|
\fB-m \fInum\fB\fR
|
|
.TP
|
|
\fB--maxserial \fInum\fB\fR
|
|
Set to \fInum\fR the maximum number
|
|
of serial jobs which can run simultaneously. By default,
|
|
this value is set to 1.
|
|
|
|
\fBSee also\fR: option serial in \fBfcrontab\fR(5).
|
|
.TP
|
|
\fB-q \fInum\fB\fR
|
|
.TP
|
|
\fB--queuelen \fInum\fB\fR
|
|
Set to n the number of jobs the serial queue and
|
|
the lavg queue can contain.
|
|
.TP
|
|
\fB-c \fIfile\fB\fR
|
|
.TP
|
|
\fB--configfile \fIfile\fB\fR
|
|
Make \fBfcron\fR use config file
|
|
\fIfile\fR instead of default config file
|
|
\fI/usr/local/etc/fcron.conf\fR\&. To interact with that running
|
|
\fBfcron\fR process, \fBfcrontab\fR must use the same config file (which is defined by
|
|
\fBfcrontab\fR\&'s option \fB-c\fR). That way, several \fBfcron\fR processes
|
|
can run simultaneously on an only system (but each \fBfcron\fR process *must* have a
|
|
different spool dir and pid file from the other processes).
|
|
.TP
|
|
\fB-o\fR
|
|
.TP
|
|
\fB--once\fR
|
|
Execute all jobs that need to be run at the time \fBfcron\fR
|
|
was started, wait for them, then return. Sets --sleeptime to 0.
|
|
May be especially useful when used with options \fB-y\fR and
|
|
\fB-f\fR in a script run, for instance, at dialup connection.
|
|
|
|
\fBSee also\fR: fcrontab's options volatile,
|
|
stdout\&.
|
|
.TP
|
|
\fB-y\fR
|
|
.TP
|
|
\fB--nosyslog\fR
|
|
Don't log to syslog at all. May be useful when running
|
|
in foreground.
|
|
.TP
|
|
\fB-p \fIfile\fB\fR
|
|
.TP
|
|
\fB--logfilepath \fIfile\fB\fR
|
|
If set, log to the file given as argument. \fBfcron\fR will
|
|
log to both that file and syslog in parallel unless
|
|
\fB-y\fR is also set.
|
|
.TP
|
|
\fB-l \fItime\fB\fR
|
|
.TP
|
|
\fB--firstsleep \fItime\fB\fR
|
|
Sets the initial delay (in seconds) before any job is
|
|
executed, default to 20 seconds.
|
|
.TP
|
|
\fB-n \fIdir\fB\fR
|
|
.TP
|
|
\fB--newspooldir \fIdir\fB\fR
|
|
Create \fIdir\fR as a new spool
|
|
directory for \fBfcron\fR\&. Set correctly its mode and owner. Then, exit.
|
|
.TP
|
|
\fB-h\fR
|
|
.TP
|
|
\fB--help\fR
|
|
Display a brief description of the options.
|
|
.TP
|
|
\fB-V\fR
|
|
.TP
|
|
\fB--version\fR
|
|
Display an informational message about \fBfcron\fR,
|
|
including its version and the license under which it is distributed.
|
|
.TP
|
|
\fB-d\fR
|
|
.TP
|
|
\fB--debug\fR
|
|
Run in debug mode (more details on stderr -- if option
|
|
\fB-f\fR is set -- and in log file)
|
|
.SH "RETURN VALUES"
|
|
.PP
|
|
\fBFcron\fR returns 0 on normal exit, and 1 on
|
|
error.
|
|
.SH "SIGNALS"
|
|
.TP
|
|
\fBSIGTERM\fR
|
|
Save configuration (time remaining until next
|
|
execution, time and date of next execution, etc), wait for all running jobs and
|
|
exit.
|
|
.TP
|
|
\fBSIGUSR1\fR
|
|
Force \fBfcron\fR to reload its configuration.
|
|
.TP
|
|
\fBSIGUSR2\fR
|
|
Make \fBfcron\fR print its current schedule on syslog. It
|
|
also toggles on/off the printing on debug info on syslog.
|
|
.TP
|
|
\fBSIGHUP\fR
|
|
Tell \fBfcron\fR to check if there is any configuration
|
|
update (this signal is used by \fBfcrontab\fR(5))
|
|
.SH "CONFORMING TO"
|
|
.PP
|
|
Should be POSIX compliant.
|
|
.SH "FILES"
|
|
.TP
|
|
\fB\fI/usr/local/etc/fcron.conf\fB\fR
|
|
Configuration file for \fBfcron\fR, \fBfcrontab\fR and
|
|
\fBfcrondyn\fR: contains paths (spool dir, pid file) and default programs to use
|
|
(editor, shell, etc). See \fBfcron.conf\fR(5)
|
|
for more details.
|
|
.TP
|
|
\fB\fI/usr/local/etc/fcron.allow\fB\fR
|
|
Users allowed to use \fBfcrontab\fR and \fBfcrondyn\fR (one
|
|
name per line, special name "all" acts for everyone)
|
|
.TP
|
|
\fB\fI/usr/local/etc/fcron.deny\fB\fR
|
|
Users who are not allowed to use \fBfcrontab\fR and
|
|
\fBfcrondyn\fR (same format as allow file)
|
|
.TP
|
|
\fB\fI/usr/local/etc/pam.d/fcron\fB (or \fI/usr/local/etc/pam.conf\fB)\fR
|
|
PAM configuration file for
|
|
\fBfcron\fR\&. Take a look at \fBpam\fR(8) for more details.
|
|
.SH "SEE ALSO"
|
|
|
|
\fBfcrontab\fR(1),
|
|
|
|
\fBfcrondyn\fR(1),
|
|
|
|
\fBfcrontab\fR(5),
|
|
|
|
\fBfcron.conf\fR(5),
|
|
|
|
\fBfcron\fR(8).
|
|
|
|
If you're learning how to use fcron from scratch, I suggest
|
|
that you read the HTML version of the documentation (if your are not reading it
|
|
right now! :) ): the content is the same, but it is easier to navigate thanks
|
|
to the hyperlinks.
|
|
.SH "AUTHOR"
|
|
.PP
|
|
Thibault Godouet <fcron@free.fr>
|