Next: , Previous: Invoking mcron, Up: Invoking



4.2 Invoking cron or crond

NOTE THAT THIS SECTION ONLY APPLIES IF THE cron or crond, and crontab PROGRAMS HAVE BEEN INSTALLED BY THE SYSTEM ADMINISTRATOR.

If the program runs by the name of cron or crond, then it will read all the files in /var/cron/tabs (which should only be readable by root) and the file /etc/crontab, and then detaches itself from the terminal to live forever as a daemon process. Additionally, it creates a UNIX socket at /var/cron/socket, and listens for messages sent to that socket consisting of a user name whose crontabs have been changed. In this case, the program will re-read that user's crontab. This is for correct functioning with the crontab program.

Further, if the --noetc option was not used, a job is scheduled to run every minute to check if /etc/crontab has been modified recently. If so, this file will also be re-read.

The options which may be used with this program are as follows.

-v
--version
This option causes a message to be printed on the standard output with information about the version and copyright for the current program.


-h
--help
This causes a short but complete usage message to be displayed on standard output.
-s [count]
--schedule[=count]
With this option specified no commands are run. Instead, the program computes the times the commands would be run and prints the information to the screen, and then immediately exits.

The count, if supplied, indicates the number of commands to display. The default value is 8.


-n
--noetc
This tells cron not to add a job to the system which wakes up every minute to check for modifications to /etc/crontab. It is recommended that this option be used (and further that the /etc/crontab file be taken off the system altogether!)