Difference between revisions of "Fcron"
Weibullguy (talk | contribs) m |
m (update download link (previous repo closed)) |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 2: | Line 2: | ||
|-valign="top" | |-valign="top" | ||
! Download Source: | ! Download Source: | ||
− | | | + | | http://fcron.free.fr/archives/fcron-{{Fcron Version}}.src.tar.gz |
|} | |} | ||
Line 22: | Line 22: | ||
useradd -c "Fcron User" -d /dev/null -u 24 -g fcron -s /bin/false 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 [http://fcron.free.fr/doc/en/faq.html Fcron's FAQ] if you want to do this. |
|- | |- | ||
− | | | + | |''--with-dsssl-dir=/usr/share/sgml/docbook/dsssl-stylesheets-{{DocBook DSSSL StyleSheets-Version}}'': Pass this to build the DocBook documentation. This path assumes that you followed the CBLFS instructions for installing the [[DocBook DSSSL StyleSheets]]. |
|} | |} | ||
− | + | {{Note|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. | |
− | If you | + | 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.}} | |
== Non-Multilib == | == Non-Multilib == | ||
Line 67: | Line 46: | ||
Compile the package: | Compile the package: | ||
− | ./configure --prefix=/usr -- | + | ./configure --prefix=/usr --sysconfdir=/etc \ |
+ | --localstatedir=/var --with-boot-install=no \ | ||
+ | --without-sendmail && | ||
make | make | ||
Line 87: | Line 68: | ||
Compile the package: | Compile the package: | ||
− | CC="gcc ${BUILD32}" ./configure --prefix=/usr -- | + | CC="gcc ${BUILD32}" ./configure --prefix=/usr \ |
− | --with-boot-install=no && | + | --sysconfdir=/etc --localstatedir=/var \ |
+ | --with-boot-install=no --without-sendmail && | ||
make | make | ||
Line 99: | Line 81: | ||
Compile the package: | Compile the package: | ||
− | CC="gcc ${BUILDN32}" ./configure --prefix=/usr -- | + | CC="gcc ${BUILDN32}" ./configure --prefix=/usr \ |
− | --with-boot-install=no && | + | --sysconfdir=/etc --localstatedir=/var \ |
+ | --with-boot-install=no --without-sendmail && | ||
make | make | ||
Line 111: | Line 94: | ||
Compile the package: | Compile the package: | ||
− | CC="gcc ${BUILD64}" ./configure --prefix=/usr -- | + | CC="gcc ${BUILD64}" ./configure --prefix=/usr \ |
− | --with-boot-install=no && | + | --sysconfdir=/etc --localstatedir=/var \ |
+ | --with-boot-install=no --without-sendmail && | ||
make | make | ||
Line 121: | Line 105: | ||
== Configuring == | == Configuring == | ||
− | === | + | === Configuration Files === |
− | /etc/fcron.conf, /etc/fcron.allow, and /etc/fcron.deny | + | The files /etc/fcron.conf, /etc/fcron.allow, and /etc/fcron.deny are used to configure fcron behavior. |
=== Configuration Information === | === 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. | 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. | ||
+ | |||
+ | <pre> | ||
+ | cat >> /etc/rsyslog.d/fcron.conf << "EOF" | ||
+ | # Log Fcron | ||
+ | cron.* -/var/log/cron.log | ||
+ | |||
+ | # End /etc/rsyslog.d/fcron.conf | ||
+ | EOF | ||
+ | </pre> | ||
+ | |||
+ | In order to bring our changes into effect, we need to reload the '''rsyslog''' daemon: | ||
+ | |||
+ | /etc/rc.d/init.d/rsyslog reload | ||
=== Boot Script === | === Boot Script === | ||
Line 167: | Line 168: | ||
| 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'''). | | 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'''). | ||
|} | |} | ||
+ | |||
+ | [[Category:General Utilities]] |
Latest revision as of 16:48, 9 July 2011
Download Source: | http://fcron.free.fr/archives/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
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. |
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.dThis 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.
Non-Multilib
Compile the package:
./configure --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var --with-boot-install=no \ --without-sendmail && 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 \ --sysconfdir=/etc --localstatedir=/var \ --with-boot-install=no --without-sendmail && make
Install the package:
make install
N32
Compile the package:
CC="gcc ${BUILDN32}" ./configure --prefix=/usr \ --sysconfdir=/etc --localstatedir=/var \ --with-boot-install=no --without-sendmail && make
Install the package:
make install
64Bit
Compile the package:
CC="gcc ${BUILD64}" ./configure --prefix=/usr \ --sysconfdir=/etc --localstatedir=/var \ --with-boot-install=no --without-sendmail && make
Install the package:
make install
Configuring
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 EOF
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
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). |