[Previous] [Contents] [Next]

cron

Clock server (UNIX)

Syntax:

cron [-d crondir] [-vL] & 

Options:

-d crondir
Specifies that cron use the named directory instead of /usr/spool/cron.
-v
Turn on verbose mode. Log and diagnostic messages will be written to standard error as cron operates.
-L
Local. Automatically adds the suffix .node_ID to the cron directory name (/usr/spool/cron or the filename given to the -d option). e.g. If cron is being run on node 95 and -d is not specified, the cron directory name would be /usr/spool/cron.95. This allows cron to be run on multiple machines which share the same filesystem.

Description:

The cron server schedules commands to be run at specified times, without user intervention. This server supports user-specific cron entries, and runs continuously. The server must be run in the background.


Note:

The cron server assumes it has sole use of the /usr/spool/cron directory. Therefore, only one cron server can be run per filesystem containing that directory. The cron server is typically run on the network server.


Commands are specified by instructions found in crontab files, which are accessed via the crontab utility.

To minimize overhead, cron examines the contents of the files in /usr/spool/cron/crontabs when it first comes up, and then re-examines only those that have been changed via the crontab utility.

Files:

Errors will cause diagnostic messages to be written to standard error. If -v is specified, log messages will be written to the standard error. cron makes use of data read from the following:

/usr/spool/cron
/usr/spool/cron.nid
Each cron command assumes it has exclusive use of this directory. The cron.nid variant is used when the -L option has been specified.
/usr/spool/cron/cron.allow
/usr/spool/cron.nid/cron.allow
If present, this file will list the only users authorized to have their crontab run. By default, all users are authorized. The cron.deny list (below) overrides the setting of the cron.allow list.
/usr/spool/cron/cron.deny
/usr/spool/cron.nid/cron.deny
If present, this file will list users who are not authorized to have their crontab run. This list overrides the list of users authorized (the cron.allow file).
/usr/spool/cron/crontabs/*
The periodic commands to be run are read out of files found in this directory.

Exit status:

The cron utility normally will run indefinitely. However, it will terminate early if errors are encountered in startup, errors are encountered in reading the crontabs files, or if it is terminated by a signal.

0
cron was successfully and cleanly terminated by a SIGTERM or SIGPWR signal.
>0
An error occurred. A diagnostic message will have been written to standard error.

See also:

crontab


[Previous] [Contents] [Next]