cvs commit: hints vixie-cron.txt

tushar at tushar at
Fri Oct 10 20:50:21 PDT 2003

tushar      03/10/10 21:50:21

  Added:       .        vixie-cron.txt
  Added Hint: vixie-cron
  Revision  Changes    Path
  1.1                  hints/vixie-cron.txt
  Index: vixie-cron.txt
  AUTHOR:         Jim Gifford <lfs-hints at>
  DATE: 		2003-10-09
  LICENSE: 	GNU Free Documentation License Version 1.2
  SYNOPSIS: 	Setup vixie-cron for LFS
  DESCRIPTION:	This will describe on how to setup vixie-cron for LFS.
  Introduction to vixie-cron
  Download location for vixie-cron
  vixie-cron Version used		3.0.1
  cron is a standard UNIX program that runs user-specified programs at
  periodic scheduled times. vixie cron adds a number of features to the
  basic UNIX cron, including better security and more powerful configuration
  Required Patches for vixie-cron
  In order to build vixie-cron, you will need to patch it. I have made patches
  available and posted to The patch order listed
  is critical to follow. At this point I have assumed that you have downloaded
  the vixie-cron-3.0.1.tar.bz2 file and uncompressed it.
  Patch Order
  Patch 1 - vixie-cron-3.0.1-redhat-mdk-1.patch
  Patch 2 - vixie-cron-3.0.1-security-1.patch
  Patch 3 - vixie-cron-3.0.1-makefile-1.patch
  Patch 4 - vixie-cron-3.0.1-variables-1.patch
  Optional - PAM
  Patch 5 - vixie-cron-3.0.1-pam-1.patch
  These patches can be retrieved from
  All patches can be installed using patch -Np1 -i NAME
  Install vixie-cron by running the following commmands|
  make "gcc $CFLAGS" &&
  make install
  How-to use vixie-cron
  The cron daemon consults so-called crontabs for jobs to execute. These
  crontabs are ordinary textfiles, however you should always use the crontab
  tool to manipulate them.
  To have a look at your crontab execute crontab -l. If a crontab exists then
  it's contents is listed, otherwise "no crontab for <username>" will be
  To add or delete an entry in your crontab, use crontab -e. Which editor is
  used can be customized, but usually it's vi or whatever is in EDITOR variable.
  You add or delete entries by adding or deleting the appropriate line in the
  crontab (every entry takes exactly one line).
  Each line consists of six columns which are seperated by blanks. The sixth
  (rightmost) column tells cron which command/file to execute (always use the full
  path here), while the other five columns tell cron when to execute it.
  The columns (1 stands for the leftmost column, counting to the right) have the
  following meaning and take the values in brackets: 
  Minute (0 - 59)
  Hour (0 - 23)
  Day of month (1 - 31)
  Month (1 - 12)
  Day of the week (0 - 6, 0 representing sunday, 6 saturday) 
  In each of these five columns an asterisk ("*") stands for "every". 
  Example: "41 5 * * * /home/jim/" would mean that everyday at 5:41
  in the morning the script in jim's home directory would be executed
  (assuming, of course, that the script is executable).
  If you want to specify a group of times, then concatenate the individual values,
  seperated by commas (Example: "00,15,30,45" - in the first column this would read
  as "every quarter of an hour on the quarter of the hour").
  If you want to specify a range of times, you can use the minus (Example: "1-5"
  in the fifth column would read as "every workday"). 
  You can also create text files with the same information listed above in /etc/cron.d.
  When you add a file to this directory, crond will sense the addition and add it to the
  execution schedule.
  Make cron start on bootup
  Create the /etc/rc.d/init.d/cron by running:
  cat > /etc/rc.d/init.d/cron << "EOF"
  # Begin $rc_base/init.d/cron - cron loader
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at
  source /etc/sysconfig/rc
  source $rc_functions
  case "$1" in
  		echo "Starting Cron Scheduler..."
  		loadproc crond
  		echo "Stopping Cron Schedular..."
  		killproc crond
  		rm -f /var/run/
  		$0 stop
  		sleep 1
  		$0 start
  		statusproc crond
  		echo "Usage: $0 {start|stop|restart|status}"
  		exit 1
  # End $rc_base/init.d/cron
  Make the script executable and create the appropriate symlinks by
  chmod 755 /etc/rc.d/init.d/cron &&
  ln -s /etc/rc.d/init.d/cron /etc/rc.d/rc0.d/K08cron &&
  ln -s /etc/rc.d/init.d/cron /etc/rc.d/rc2.d/S40cron &&
  ln -s /etc/rc.d/init.d/cron /etc/rc.d/rc3.d/S40cron &&
  ln -s /etc/rc.d/init.d/cron /etc/rc.d/rc4.d/S40cron &&
  ln -s /etc/rc.d/init.d/cron /etc/rc.d/rc5.d/S40cron &&
  ln -s /etc/rc.d/init.d/cron /etc/rc.d/rc6.d/K08cron
  VERSION:        1.0
  CHANGELOG:     	1.0 Initial Version
   New Version of this document can be viewed from

More information about the hints mailing list