fcron (8) Linux Manual Page
fcron – daemon to execute scheduled tasks
Synopsis
fcron [ -c file ] [ -d ] [ -b ] [ -s time ] [ -m num ] [ -q num ] fcron [ -c file ] [ -d ] [ -f ] [ -o ] [ -y ] [ -l time ] fcron [ -n dir ] fcron [ -h ] fcron [ -V ]
Description
Fcron should be started from /etc/rc or /etc/rc.local. Unless the -f (or –foreground) option is given, it will return immediately, so you don’t need to start it with ‘&’.
Fcron loads users fcrontabs (see fcrontab(5)) files previously installed by fcrontab (see fcrontab(1)). Then, fcron 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, fcron 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 fcrontab(5)).
Informative message about what fcron is doing are sent to syslogd(8) under facility cron, priority notice. Warning and error messages are sent respectively at priority warning and error.
Note:fcronsleeps at least 20 seconds after it has been started before executing a job to avoid to use too much resources during system boot.
Options
-f–foreground- Don’t fork to the background. In this mode,
fcronwill output informational message to standard error as well as to syslogd. -b–background- Force running in background, even if
fcronhas been compiled to run in foreground as default. -stime–savetimetime- Save
fcrontabs on disk every time sec (default is 1800). -mnum–maxserialnum- Set to num the maximum number of serial jobs which can run simultaneously. By default, this value is set to 1.
See also: option serial infcrontab(5). -qnum–queuelennum- Set to n the number of jobs the serial queue and the lavg queue can contain.
-cfile–configfilefile- Make
fcronuse config file file instead of default config file /usr/local/etc/fcron.conf. To interact with that runningfcronprocess,fcrontabmust use the same config file (which is defined byfcrontab‘s option-c). That way, severalfcronprocesses can run simultaneously on an only system (but eachfcronprocess *must* have a different spool dir and pid file from the other processes). -o–once- Execute all jobs that need to be run at the time
fcronwas started, wait for them, then return. Setsfirstsleepto 0. May be especially useful when used with options-yand-fin a script run, for instance, at dialup connection.See also: fcrontab’s options volatile, stdout. -y–nosyslog- Don’t log to syslog at all. May be useful when running in foreground.
-ltime–firstsleeptime- Sets the initial delay (in seconds) before any job is executed, default to 20 seconds.
-ndir–newspooldirdir- Create dir as a new spool directory for
fcron. Set correctly its mode and owner. Then, exit. -h–help- Display a brief description of the options.
-V–version- Display an informational message about
fcron, including its version and the license under which it is distributed. -d–debug- Run in debug mode (more details on stderr — if option
-fis set — and in log file)
Return Values
Fcron returns 0 on normal exit, and 1 on error.
Signals
SIGTERM- Save configuration (time remaining until next execution, time and date of next execution, etc), wait for all running jobs and exit.
SIGUSR1- Force
fcronto reload its configuration. SIGUSR2- Make
fcronprint its current schedule on syslog. It also toggles on/off the printing on debug info on syslog. SIGHUP- Tell
fcronto check if there is any configuration update (this signal is used byfcrontab(5))
Conforming To
Should be POSIX compliant.
Files
- /usr/local/etc/fcron.conf
- Configuration file for
fcron,fcrontabandfcrondyn: contains paths (spool dir, pid file) and default programs to use (editor, shell, etc). Seefcron.conf(5) for more details. - /usr/local/etc/fcron.allow
- Users allowed to use
fcrontabandfcrondyn(one name per line, special name "all" acts for everyone) - /usr/local/etc/fcron.deny
- Users who are not allowed to use
fcrontabandfcrondyn(same format as allow file) - /usr/local/etc/pam.d/fcron
(or/usr/local/etc/pam.conf) - PAM configuration file for
fcron. Take a look atpam(8) for more details.
See Also
fcrontab(1),
fcrondyn(1),
fcrontab(5),
fcron.conf(5),
fcron(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.
Author
Thibault Godouet <fcron [at] free.fr>
