1 TITLE: How to install and configure at and the cron-daemon
3 AUTHOR: Wolfgang Arendt <wolare@gmx.de>
6 How to install and configure at and the cron-daemon
22 * Other implementations of cron
26 cron and at are two different programs that allow to execute jobs at
27 different times. cron was originally written by Paul Vixie and it's
28 primary use is, to run jobs, that need to be executed regularly. at
29 was written by Thomas Koenig and it can be used for executing programs
30 once at a given time. For example, you use cron in order to clean up
31 the /tmp/-directory every thursday night, while you would typically
32 use at in order to start a backup-process tonight at midnight.
34 This hint tells you, how to install fcron, a replacement for the
35 original Vixie-cron, written by Thibault Godouet, along with the
36 original at-program. Installing fcron is easy and straightforward,
37 installing at is not that hard either, but it needs a little work to
42 The cron-daemon will run as user cron and group cron, while at will
43 run as user daemon, with group daemon. If you do not have those groups
44 and users, please create them before you proceed.
46 You can run the daemons as different users but in that case you might
47 have to change some defaults when configuring the code later on.
51 We will not install the original cron but a replacement, called fcron.
52 cron is a very old program and it has not been maintainded for a very
53 long time. If you still feel like installing it, you can find a
54 download-location for the original program at the bottom of this
55 document along with download locations for several other
60 You can get fcron from one of the many sunsite-mirrors or from
65 After unpacking the distribution and entering it's top level
66 directory, compiling and installing goes with:
67 ./configure --prefix=/usr \
68 --with-username=cron \
69 --with-groupname=cron \
70 --with-answer-all=no &&
76 ln -s fcrontab crontab
78 This installs fcron into /usr/sbin and creates a link to
79 /usr/sbin/cron as well as it installs fcrontab into /usr/bin and makes
80 a symbolic link to /usr/bin/crontab.
82 cron is the daemon while crontab is being used in order to alter the
83 tables, that tell cron when to run a job.
85 You can safely ignore the install-script's warnings about being unable
86 to create the boot-scripts, as we will create them now.
90 Create a bootscript from the template /etc/init.d/template and link it
91 into the runlevel directories 2, 3, 4 and 5 for starting and into the
92 directories 0, 1 and 6 for killing.
94 Do that by running something like this:
97 ln -s ../init.d/cron K20cron
101 ln -s ../init.d/cron S20cron
104 You should now be able to start cron by running
105 /etc/init.d/cron start
111 You can get the at-daemon from one of the many sunsite-mirrors around
112 the globe. I picked mine from here
113 ftp://ftp.LeidenUniv.nl/pub/linux/sunsite/system/daemons/
117 Enter the top-level-directory of the uncompressed package.
119 First run ./Configure and pick your preferences. The defaults are
120 quite ok, only change the location for internal binaries from /usr/lib
121 to /usr/sbin and the location for the manual from /usr/man to
124 Then, all occurences of panic.h have to be removed from the files
125 at.c, panic.c and parsetime.c.
127 You can either do this manually, or execute:
128 for i in at.c panic.c parsetime.c; do
130 cat $i.backup | sed -e '/panic\.h/d' > $i
139 Create a cronjob for root, that calls atrun once in a minute. You
140 customize the cron-tables with the command
143 The entry, that has to be created should looks like this:
144 * * * * * /usr/sbin/atrun
150 The group daemon or the user daemon does not exist (or both are
153 Did you forget to create the cron-job, that calls atrun? (Do so by
156 Check ownership of the spool-directories. They must be accessible for
159 Other implementations of cron
161 Here are some sites, where you can get several implementations of
165 http://www.ajk.tele.fi/~too/sw/after.readme
168 http://anacron.sourceforge.net/
171 http://www.ibiblio.org/pub/Linux/system/daemons/cron/dcron-2.3.3.tar.gz
173 The original cron-daemon by Paul Vixie can be found here, along with
174 several of the formerly mentioned programs:
177 http://www.ibiblio.org/pub/Linux/system/daemons/cron/cron3.0pl1.tar.gz