[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Files Reference


queuedefs File Format

Purpose

Specifies the handling of cron daemon events.

Description

The /var/adm/cron/queuedefs file defines how the system handles different cron daemon events types. The file specifies the maximum number of processes per event type to schedule at one time, the nice value of the event type, and how long to wait before retrying to execute a process. The following event types can be scheduled by the cron daemon:

This file is empty as shipped, but can be modified to change how the cron daemon handles each event type. Each entry in the queuedefs file is of the form:

EventType.[Jobsj][Nicen][Waitw]

The fields are described as follows:

EventType Specifies a character representing an event type. The following are valid values for the EventType field:
a Specifies an at command event.
b Specifies a batch command event.
c Specifies a crontab command event.
d Specifies a sync subroutine event.
e Specifies a ksh command event.
f Specifies a csh command event.
Jobsj Specifies the maximum number of jobs the cron daemon can start at one time. The default value is 100.
Nicen Specifies the nice value for job execution. The default value is 2.
Waitw Specifies the time, in seconds, to wait before attempting to execute the command again. The default value is 60 seconds.

Note: You must have root user authority to modify this file.

The at command allows you to specify the time when a command should be run. Each command or program will be assigned a job number and will be queued in the /var/spool/cron/atjobs directory.

The queueing system may also be set up by defining a batch queue in the /etc/qconfig file and using the enq command to submit a job to this queue. This queue may be set up with a first-come, first-serve discipline. The following stanzas should be added to the /etc/qconfig file to enable this:

bsh
device = bshdev
discipline = fcfs
bshdev:
backend = usr/bin/sh

This configuration may already exist in the /etc/qconfig file. If you want your commands and programs to run under the Korn shell, you should change the last line in the above stanza to:

backend = usr/bin/ksh

After creating the above stanza in the /etc/qconfig file, enable the queue by issuing the following:

qchk -A

Programs and commands may now be run on a first-come, first-serve basis using the enq command. For example, to run the program PROGRAM1 from the bsh queue, enter:

enq -P bsh PROGRAM1

The flags for the batch facility and queueing are:

at -qa This is for queueing at jobs.
at -qb This is for queueing batch jobs.
at -qe This is for queueing ksh jobs.
at -qf This is for queueing csh jobs.

Examples

  1. To set the at command job queue to handle 4 concurrent jobs with a nice value of 1 and no retries, enter:

    a.4j1n
    
  2. To set the crontab command job queue to handle 2 concurrent jobs with a nice value of 2 and a retry in 90 seconds if the fork subroutine fails, enter:

    c.2j2n90w
    

Implementation Specifics

The queuedefs file is part of Base Operating System (BOS) Runtime.

Related Information

The at command, batch command, crontab command, csh command, enq command, ksh command, rc command.

The cron daemon.

The fork subroutine, sync subroutine.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]