[comp.unix.questions] sVr2.2: what is /usr/lib/cron/queuedefs?

brandon@tdi2.UUCP (Brandon Allbery) (01/12/87)

Quoted from <210@bigtex.uucp> ["Re: ulimit considered braindamaged ?"], by james@bigtex.uucp (James Van Artsdalen)...
+---------------
| "at" or "batch" jobs (or you could modify /usr/lib/cron/.proto I suppose).
+---------------

Which reminds me:  the file /usr/lib/cron/queuedefs has consistently confused
me.  Is it, as it appears, a way of specifying "flags" for multiple "at"
queues?

a.4j1n		<- apparently the definition for the "at" queue
b.2j2n90w	<- and for the "batch" (really, "at -b") queue

If I don't need a sVr2 source license to get the answers, I'd like to know:

(1) Are the lines in queuedefs actually the flags for the "a" and "b" queues?
(2) If (1), what do the flags mean, and what other flags are there?
(3) Can I create my own queues, using the flags from (2)?  How do I specify
    an arbitrary queue to "at"?

Needless to say, I have neither source nor a license thereto.  If answering
my questions would violate a license agreement, please let me know.  (If I
have managed to violate a license aggreement with this posting, that goes
double!  The only license aggreement I've seen is that from Plexus, which
REFERS to the AT&T license that is not provided with Plexus's SysV.)

Thanks in advance,

++Brandon
-- 
``for is he not of the Children of Luthien?  Never shall that line fail, though
the years may lengthen beyond count.''  --J. R. R. Tolkien

Brandon S. Allbery	           UUCP: cbatt!cwruecmp!ncoast!tdi2!brandon
Tridelta Industries, Inc.         CSNET: ncoast!allbery@Case
7350 Corporate Blvd.	       INTERNET: ncoast!allbery%Case.CSNET@relay.CS.NET
Mentor, Ohio 44060		  PHONE: +1 216 255 1080 (home) +1 216 974 9210

jrw@hropus.UUCP (01/13/87)

> Which reminds me:  the file /usr/lib/cron/queuedefs has consistently confused
> me.  Is it, as it appears, a way of specifying "flags" for multiple "at"
> queues?

Close ;-)

> a.4j1n		<- apparently the definition for the "at" queue
> b.2j2n90w		<- and for the "batch" (really, "at -b") queue
							    ^^ oops?

> If I don't need a sVr2 source license to get the answers, I'd like to know:

I hope you don't need a license for this, so, here goes...

> (1) Are the lines in queuedefs actually the flags for the "a" and "b" queues?
> (2) If (1), what do the flags mean, and what other flags are there?

		b.2j2n90w
		| | |  |
		| | |  + wait 90 seconds if the queue is full before
		| | |    looking at it again
		| | |
		| | +--- nice value of 2 on this queue
		| |
		| +----- run 2 jobs max (at a time) on this queue
		|
		+------- the queue [a-z]

> (3) Can I create my own queues, using the flags from (2)?  How do I specify
>     an arbitrary queue to "at"?

Just add a similar line to this file.

cat-ing /usr/bin/batch reveals a shell script.  As it is probably considered
source code, I cannot show it here ;-) but you specify different queues to at
by saying "at -qA" where A is [a-z].  

This is how it is done here anyway....
-- 
Jim Webb             "Out of phase--get help"          ...!ihnp4!hropus!jrw
    "Make sure comments and code agree.  If not, write a man page..."

naftoli@aecom.UUCP (Robert N. Berlinger) (01/15/87)

In article <131@tdi2.UUCP>, brandon@tdi2.UUCP (Brandon Allbery) writes:
> Which reminds me:  the file /usr/lib/cron/queuedefs has consistently confused
> me.  Is it, as it appears, a way of specifying "flags" for multiple "at"
> queues?
> 
> a.4j1n		<- apparently the definition for the "at" queue
> b.2j2n90w	<- and for the "batch" (really, "at -b") queue
> 
> If I don't need a sVr2 source license to get the answers, I'd like to know:
> 
> (1) Are the lines in queuedefs actually the flags for the "a" and "b" queues?
> (2) If (1), what do the flags mean, and what other flags are there?
> (3) Can I create my own queues, using the flags from (2)?  How do I specify
>     an arbitrary queue to "at"?

There can be up to 26 queues.  Each line of the queuedefs file must
have the following format:

q.NNjNNnNNw

where

q	is a letter a-z indicating the job queue

NNj	is the limit on jobs that can be running at one for the
	job queue (concurrency, NN is an integer defaulting to 100).

NNn	is the nice(1) value that is assigned each command executed for
	the job queue (default is 2)

NNw	is the time (in seconds) to wait before retrying to execute
	a command if all the criteria for running the command are not
	met (default 60).

Empty fields are initialized to default values.

Info gotten from UNIX System V System Release Description 2.0 #307-006

Hope this helps.
-- 
Robert N. Berlinger
Systems Analyst, Scientific Computing Center		Compuserve: 73047,741
Albert Einstein College of Medicine			Easylink:   62956067
UUCP: ...{philabs,cucard,pegasus,rocky2}!aecom!naftoli	GEnie:	    R.Berlinger

wescott@ncrcae.Columbia.NCR.COM (Mike Wescott) (01/15/87)

In article <855@hropus.UUCP> jrw@hropus.UUCP writes:
> 
> > (3) Can I create my own queues, using the flags from (2)?  How do I specify
> >     an arbitrary queue to "at"?
> 
> Just add a similar line to this file.

No need if you're willing to use the default values.
Which are 100j2n60w.

> cat-ing /usr/bin/batch reveals a shell script.  As it is probably considered
> source code, I cannot show it here ;-) but you specify different queues to at
> by saying "at -qA" where A is [a-z].  

Yeah. But watch out.  at -qc can cause cron to dump core in the atjobs spool
directory.  It seems that the "c" queue is a cron job and cron is not equipped
to properly execute "cron" jobs from at files.  Fix to be posted later.

	-Mike Wescott
	ncrcae!wescott

dan@rose3.UUCP (01/16/87)

The people that have answered this question have been very helpfull.  But
I would like to know if there are any OTHER parameters that can be put
into the queuedefs file that the a and b queues don't use.  My specific
need is to define a queue where the jobs are only executed during certain
hours of the day.

Dan Messinger
dan@rose3.UUCP, dan@rose3.Rosemount.COM