Fcron
Download Source: | ftp://ftp.seul.org/pub/fcron/fcron-3.1.2.src.tar.gz |
---|
Contents
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/
Dependencies
Optional
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
Note to DESTDIR Fans
This package uses DESTDIR and for the most part installs itself beautifully. It has one problem however. The problem is Linux-PAM-related, so if you haven't installed Linux-PAM, then you can ignore the rest of this section.
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 just 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 and you can ignore the rest of this section. However if you're using the /etc/pam.d scheme, then you need to run the following command prior to running make install:
install -dv <DESTDIR>/etc/pam.d
This rather simple fix makes it so that Fcron's script thinks that you're using the /etc/pam.d scheme - which of course is what we want. With that, DESTDIR works just as you'd expect.
Additional Configuration Options
--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. |
Extra
If you want to Fcron to log its messages, then you need to add it to /etc/syslog.conf.
sed -i 's@# End /etc/syslog.conf@@' /etc/syslog.conf && cat >> /etc/syslog.conf << "EOF" # log Fcron: cron.* -/var/log/cron.log # End /etc/syslog.conf EOF
The large spacing makes it so that it lines up with what's already in /etc/syslog.conf. The sed makes it so that the comment that delineates the end of the file still delineates the end of the file after our addition.
In order to bring our changes into effect, we need to reload the sysklogd daemon:
/etc/rc.d/init.d/sysklogd reload
Non-Multilib
Compile the package:
./configure --prefix=/usr --without-sendmail --with-boot-install=no && make
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.
Multilib
This package does not provide any libraries so only one installation is needed.
32Bit
Compile the package:
CC="gcc ${BUILD32}" ./configure --prefix=/usr --without-sendmail \ --with-boot-install=no && make
Install the package:
make install
N32
Compile the package:
CC="gcc ${BUILDN32}" ./configure --prefix=/usr --without-sendmail \ --with-boot-install=no && make
Install the package:
make install
64Bit
Compile the package:
CC="gcc ${BUILD64}" ./configure prefix=/usr --without-sendmail \ --with-boot-install=no && make
Install the package:
make install
Configuring
Config Files
/etc/fcron.conf, /etc/fcron.allow, and /etc/fcron.deny
Configuration Information
You don't really need to do anything to configure Fcron, but 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.
Boot Script
blfs-bootscripts has a boot script for Fcron. Install it as follows:
make install-fcron
Contents
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). |