Open System Services Management and Operations Guide (G06.30+, H06.08+, J06.03+)
DescriptionFile
Contains shell commands required to provide the correct
shell environment for at and batch jobs.
/var/adm/cron/.proto
Configures the task queues to be used for the at, batch,
and cron commands.
/var/adm/cron/queuedefs
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” (page 74). To add commands to an at queue file, use the at command as described
in “The at Command” (page 74).
To monitor the task queues, use the atq command as described in “The atq Command” (page 75).
To remove unwanted entries, use the atrm command as described in “The atrm Command”
(page 75). To add processes that the system determines when to run, use the batch command as
described in “The batch Command” (page 75).
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.
For more information about the crontab command, see the crontab(1) reference page either
online or in the Open System Services Shell and Utilities Reference Manual.
The at Command
The at command runs OSS shell commands at a time you specify. You can use the at 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. If a file specified in an at command is executable (that is, has
the x permission for the user executing the command), at treats the file as a command and the
job consists only of this command. If the file is not executable, at uses the file’s contents as the
instructions for the job. If at cannot find the file, the specification is passed to the date parser. If
the date parser does not recognize the specification, you receive an error message.
Variables in the shell environment, the current directory, umask, and ulimit are retained when
the commands are run; for more information about the mechanism used to do this, see the
.proto(4) reference page either online or in the Open System Services Shell and Utilities
Reference Manual. Open file descriptors, interrupts, and priority are lost.
74 Operating the OSS Environment