Jump to: navigation, search
Download Source: http://fcron.free.fr/archives/fcron-3.1.2.src.tar.gz


Introduction to Fcron

Fcron is a periodical command scheduler which aims at replacing Vixie-Cron, so it implements most of its functionalities. However, unlike Vixie Cron, Fcron does not assume that your system is running either all the time or regularly. You can, for instance, tell Fcron to execute tasks every x hours y minutes of system up time or to do a job only once in a specified interval of time. Fcron has also many more features: you can also set a nice value to a job, run it depending on the system load average, and much more.

Project Homepage: http://fcron.free.fr/



Creating the fcron User/Group

We need to create the fcron group and the fcron user to run fcron:

groupadd -g 24 fcron &&
useradd -c "Fcron User" -d /dev/null -u 24 -g fcron -s /bin/false fcron

Configuration Information

--with-editor=PATH: Set the default editor for fcron. Without this flag, Fcron assumes vi.
--with-run-non-privileged=no: This is used if you want to run fcron as an unprivleged user. You need to look at Fcron's FAQ if you want to do this.
--with-dsssl-dir=/usr/share/sgml/docbook/dsssl-stylesheets-1.79: Pass this to build the DocBook documentation. This path assumes that you followed the CBLFS instructions for installing the DocBook DSSSL StyleSheets.


Fcron uses DESTDIR, but has a problem with Linux-PAM. If you haven't installed Linux-PAM, then you can ignore the rest of this note.

The script that determines whether you are you using the /etc/pam.conf or the /etc/pam.d scheme for Linux-PAM configuration checks whether or not /etc/pam.d exists. If it does, then it assumes that you're using the /etc/pam.d scheme. If it doesn't, then it assumes that you're using the /etc/pam.conf scheme. This works fine unless you're using DESTDIR. The script fails to take DESTDIR into account. As such, it goes looking for <DESTDIR>/etc/pam.d and naturally doesn't find it.

So, if you're using DESTDIR, then it will always decide that you're using the /etc/pam.conf scheme. If you are using that scheme, then everythings fine. However if you're using the /etc/pam.d scheme, then you need to execute the following command prior to running make install:

install -dv <DESTDIR>/etc/pam.d
This simple fix makes it so that Fcron's script detects that you're using the /etc/pam.d scheme. With this, DESTDIR works as expected.


Compile the package:

./configure --prefix=/usr --sysconfdir=/etc \
    --localstatedir=/var --with-boot-install=no \
     --without-sendmail &&

Install the package:

make install

Command Explanations

--without-sendmail: This stops Fcron from e-mailing you the results of the 'fcron script.

--with-boot-install=no: This prevents the installation of the package's bootscript.


This package does not provide any libraries so only one installation is needed.


Compile the package:

CC="gcc ${BUILD32}" ./configure --prefix=/usr \
    --sysconfdir=/etc --localstatedir=/var \
    --with-boot-install=no --without-sendmail &&

Install the package:

make install


Compile the package:

CC="gcc ${BUILDN32}" ./configure --prefix=/usr \
    --sysconfdir=/etc --localstatedir=/var \
    --with-boot-install=no --without-sendmail &&

Install the package:

make install


Compile the package:

CC="gcc ${BUILD64}" ./configure --prefix=/usr \
    --sysconfdir=/etc --localstatedir=/var \
    --with-boot-install=no --without-sendmail &&

Install the package:

make install


Configuration Files

The files /etc/fcron.conf, /etc/fcron.allow, and /etc/fcron.deny are used to configure fcron behavior.

Configuration Information

fcrontab is used to write fcron scripts. Refer to the man pages for more information.

If Linux-PAM was installed, then two PAM configuration files were installed in /etc/pam.d. However, if there is no /etc/pam.d and you are using /etc/pam.conf instead, then corresponding configuration sections were added to your pam.conf file instead.

Logging Fcron Messages

If you want to Fcron to log its messages, then you need to add it to /etc/syslog.conf.

cat >> /etc/rsyslog.d/fcron.conf << "EOF"
# Log Fcron
cron.*                        -/var/log/cron.log

# End /etc/rsyslog.d/fcron.conf

In order to bring our changes into effect, we need to reload the rsyslog daemon:

/etc/rc.d/init.d/rsyslog reload

Boot Script

Bootscripts has a boot script for Fcron. Install it as follows:

make install-fcron


Installed Programs: fcron, fcrondyn, fcronsighup, fcrontab
Installed Libraries: None
Installed Directory: /usr/share/doc/fcron-3.1.2, /var/spool/fcron

Short Descriptions

fcron is a daemon to execute scheduled tasks.
fcrondyn is a user tool intended to interact with a running fcron daemon. It can, for instance, list user's jobs loaded by fcron, run one of them, renice a running job, send a signal to a running job, etc.
fcronsighup is the program used by fcrontab to tell fcron it should reload its configuration.
fcrontab is the program intended to install, edit, list and remove the tables used by fcron daemon. As fcron internally uses a non-human readable format (this is needed because fcron saves more informations than the user gives, for example the time and date of next execution), the user cannot directly edit their fcrontab (the one used by fcron).
Personal tools