Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

Miscellaneous Files and Commands cron(8)
NAME
cron - Runs the system clock demon
SYNOPSIS
cron
DESCRIPTION
The cron demon runs shell commands at specied dates and times. Commands that are to run
according to a regular or periodic schedule are found within the crontab les. Commands that
are to run only once are found within the at les. You submit crontab and at le 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
les. This strategy reduces the overhead of checking for new or changed les at regularly
scheduled intervals.
The cron command creates a log of its activities as a le named log in the directory
/var/adm/cron. When the log le size exceeds 2.5 MB (2,621,440 bytes), the log le is closed
and renamed to save its information. A new log le named log is created in the same directory.
The renamed log les lename has the format
log_yyyymmddhhnnss
where the variable information denotes the year, month, day, hour, minute, and second at which
the le 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 specied in OSS pathname format, so the $ is omitted
The rst character cannot be a Z
When CRON_NAMED is not dened 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-003 Hewlett-Packard Company 125