Open System Services Management and Operations Guide (G06.29+, H06.07+)
Operating the OSS Environment
Open System Services Management and Operations Guide—527191-005
2-36
Using the cron Process
HP provides sample files for the at.deny, cron.deny, .proto, and queuedefs
files. You can create the working copies of these files by entering the following at an
OSS shell prompt before you use the cron process for the first time:
cp /usr/lib/cron/at.deny.sample /usr/lib/cron/at.deny
cp /var/adm/cron/cron.deny.sample /var/adm/cron/cron.deny
cp /var/adm/cron/.proto.sample /var/adm/cron/.proto
cp /var/adm/cron/queuedefs.sample /var/adm/cron/queuedefs
Do not repeat this action after updates to the OSS shell product (T8626) or you will
overwrite your site-specific modifications with HP’s sample data.
To add commands to the crontab file, use the crontab command as described in
The crontab Command on page 2-36. To add commands to an at queue file, use the
at command as described in The at Command on page 2-37.
To monitor the task queues, use the atq command as described in The atq Command
on page 2-37. To remove unwanted entries, use the atrm command as described in
The atrm Command on page 2-38. To add processes that the system determines when
to run, use the batch command as described in The batch Command on page 2-38.
During process initialization and when cron detects a change, it examines the files in
the /var/spool/cron/crontabs directory and the at queue files. This strategy
reduces the overhead of checking for new or changed files at scheduled intervals.
The cron command creates a log of its activities. The cron process 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
The crontab Command
The crontab utility adds files that you specify to the /var/spool/cron/crontabs
directory. You can use the crontab command to read from the standard input file or
accept as arguments the names of commands to be run and when the commands are
to be run.
/var/adm/cron/cron.deny Lists the user IDs that are denied
access to the crontab file.
/var/adm/cron/.proto Contains shell commands required
to provide the correct shell
environment for at and batch
jobs.
/var/adm/cron/queuedefs Configures the task queues to be
used for the at, batch, and cron
commands.