Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
Administrator Commands and Files cron(8)
NAME
cron - Runs the system clock demon
SYNOPSIS
cron
DESCRIPTION
The cron demon runs shell commands at specified dates and times. Commands that are to run
according to a regular or periodic schedule are found within the crontab files. Commands that
are to run only once are found within the at files. You submit crontab and at file entries by using
the crontab and at commands. Because the cron process exits only when killed or when the sys-
tem stops, only one cron demon should exist on the system at any given time.
During process initialization and when
cron detects a change, it examines the crontab and at
files. This strategy reduces the overhead of checking for new or changed files at regularly
scheduled intervals.
The cron command creates a log of its activities as a file named log in the directory
/var/adm/cron. When the log file size exceeds 2.5 MB (2,621,440 bytes), the log file is closed
and renamed to save its information. A new log file named log is created in the same directory.
The renamed log file’s filename has the format
log_yyyymmddhhnnss
where the variable information denotes the year, month, day, hour, minute, and second at which
the file was renamed.
The cron demon starts each job with the following process attributes stored with the job by the
invoking process:
• Effective and real user IDs
• Effective and real group IDs
• Supplementary groups
Environment Variables
cron runs as a named process if the CRON_NAMED environment variable is set and exported
before the cron command is entered. The environment variable has the form:
CRON_NAMED=/G/process_name
where process_name conforms to the rules for Guardian process names described in the path-
name(5) reference page, available either online or in the Open System Services System Calls
Reference Manual. The following additional rules apply:
• The process name must be specified in OSS pathname format, so the $ is omitted
• The first character cannot be a Z
When CRON_NAMED is not defined or is not exported, cron starts as an unnamed process and
nothing prevents the undesirable situation of accidentally running multiple copies.
EXAMPLES
1. The following set of commands starts cron as the named process $CRON if another copy
of cron is not already running with the same name:
export CRON_NAMED=/G/CRON
cron
527188-007 Hewlett-Packard Company 12−5