qer, runq - queues management for spooled files
qer root tag reply args
runq [ -ad ] root cmd
Qer creates a control and a data file in a queue directory. The control file contents
consist of the tag, reply, and args separated by spaces. The data file contains the stan-
dard input to qer. The files are created in the directory root/user, where user is the
contents of /dev/user. Mktemp(2) is used to create the actual names of the control and
Runq processes the files queued by qer. Without the -a option, runq processes all
requests in the directory root/user, where user is the contents of /dev/user. With the -a
it processes all requests. Each request is processed by executing the command cmd with
the contents of the control file as its arguments, the contents of the data file as its
standard input, and standard error appended to the error file E.XXXXXX.
The action taken by runq depends on the return status of cmd. If cmd returns a null sta-
tus, the processing is assumed successful and the control, data, and error files are
removed. If cmd returns an error status containing the word the files are left to be
reprocessed at a later time. For any other status, an error message is mailed to the
requester and the files are removed. Runq uses the reply field in the control file as a
mail address to which to send an error notification. The notification contains the con-
tents of the control file to identify the failed request.
To avoid reprocessing files too often, the following algorithm is used: a data file
younger than one hour will not be processed if its error file exists and was last modified
within the preceding 10 minutes. A data file older than one hour will not be processed if
its error file exists and was last modified within the preceding hour.
The -d option causes debugging output on standard error describing the progress through
Runq is often called from cron(8) by an entry such as
0,10,20,30,40,50 * * * * kremvax
runq -a /mail/queue /mail/lib/remotemail
The entry must be a single line; it is folded here only so it fits on the page.
queue directory for user