Open System Services Management and Operations Guide (G06.30+, H06.08+, J06.03+)
The inetd command provides OSS sockets with specific services, sometimes by starting the
corresponding server. See the inetd(8) reference page either online or in the Open System
Services Shell and Utilities Reference Manual. More information about the inetd command can
be found in “Starting a Network Services Server” (page 129).
Scheduling Periodic Tasks
You can schedule programs or multiple-task OSS shell scripts to run in the OSS environment at
predetermined times and intervals. The OSS environment offers two ways to do this: the cron
utility with related OSS shell commands, and the NetBatch product with the TACL OSH command.
The following subsections discuss these options:
• “Using the cron Process” (page 73)
• “Using the NetBatch Product” (page 75)
Using the cron Process
The cron process runs shell commands at specified dates and times. The commands that are to
be run and the schedule are placed in entries within files in a specific directory. Commands that
are to run only once are placed within files in the at queue. Commands that can be run at
system-determined times are placed within files in the batch queue.
The cron process supports the following OSS shell commands:
• “The crontab Command” (page 74)
• “The at Command” (page 74)
• “The atq Command” (page 75)
• “The atrm Command” (page 75)
• “The batch Command” (page 75)
Because the cron process exits only when killed or when the system stops, only one cron process
should exist on the system at any given time. You can ensure that only one process runs by using
the CRON_NAMED environment variable before starting any copy of cron; always use the same
process name.
For more information about starting and managing the cron process, see the cron(8) reference
page either online or in the Open System Services Shell and Utilities Reference Manual.
Configuring the cron Process
You must create the following files to configure the cron process. The cron process uses these
files to determine whether and when to run shell commands:
DescriptionFile
Lists the user IDs that are denied access to the at queue/usr/lib/cron/at.deny
Lists the commands to be run at specified times./var/spool/cron/crontabs/crontab
Lists the user IDs that are allowed to change the crontab
file. (This file is optional; see the crontab(1) reference
/var/adm/cron/cron.allow
page either online or in the Open System Services Shell
and Utilities Reference Manual for more information.)
Lists the user IDs that are denied access to the crontab
file.
/var/adm/cron/cron.deny
Scheduling Periodic Tasks 73