Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amdcad!sun!pitstop!sundc!seismo!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.sys.sgi Subject: Re: At, Batch ... Message-ID: <954@auspex.UUCP> Date: 4 Feb 89 23:08:56 GMT References: <205:doelz@urz.unibas.ch> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 259 >The BATCH and AT commands are not reasonably documented. I tried to find >out what the queue definitions are by trial and error, and up to now >SGI did not offer any documentation on the queuedefs file. The following are based on man pages I did at Sun for the "queuedefs" and ".proto" files; they have, I think, been properly edited to document the vanilla S5R3 versions (i.e., no SunOS changes). You may have to change them to reflect any SGI changes. #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'proto.4' <<'END_OF_FILE' X.TH PROTO 4 X.SH NAME Xproto \- prototype job file for at X.SH SYNOPSIS X.LP X.B /usr/lib/cron/.proto X.LP X.BI /usr/lib/cron/.proto. queue X.SH DESCRIPTION X.LP XWhen a job is submitted to X.IR at (1) Xor X.IR batch (1), Xthe job is constructed as a shell script. First, a prologue is Xconstructed, consisting of: X.IP \(bu 3 XA header specifying whether the job is an X.I at Xjob or a X.I batch Xjob; X.IP \(bu XA set of Bourne shell commands to make the environment (see X.IR environ (4)) Xfor the X.I at Xjob the same as the current environment. X.LP X.I at Xthen reads a \*(lqprototype file,\*(rq and constructs the rest of the Xjob file from it. X.LP XText from the prototype file is copied to the job file, except for Xspecial \*(lqvariables\*(rq that are replaced by other text: X.RS X.TP X.B $d Xis replaced by the current working directory X.PD 0 X.TP X.B $l Xis replaced by the current file size limit (see X.IR ulimit (2)) X.TP X.B $m Xis replaced by the current umask (see X.IR umask (2)) X.TP X.B $t Xis replaced by the time at which the job should be run, expressed as seconds Xsince January 1, 1970, 00:00 Greenwich Mean Time, preceded by a colon X.TP X.B $< Xis replaced by text read by X.I at Xfrom the standard input (that is, the commands provided to X.I at Xto be run in the job) X.PD X.RE X.LP XIf the job is submitted in queue X.IR queue , X.I at Xuses the file X.BI /usr/lib/cron/.proto. queue Xas the prototype file if it exists, otherwise it will use the file X.BR /usr/lib/cron/.proto . X.SH EXAMPLES XThe standard X.B .proto Xfile supplied with System V is: X.LP X.RS X.nf X.ft B X#ident "@(#)adm:.proto 1.2" Xcd $d Xulimit $l Xumask $m X$< X.ft R X.fi X.RE X.LP Xwhich causes commands to change the current directory in the job to the Xcurrent directory at the time X.I at Xwas run, to change the ulimit in the job to the ulimit at the time X.I at Xwas run, and to change the umask in the job to the umask at the time X.I at Xwas run, to be inserted before the commands in the job. X.SH FILES X.PD 0 X.TP 20 X.B /usr/lib/cron/.proto X.LP X.BI /usr/lib/cron/.proto. queue X.PD X.SH "SEE ALSO" X.IR at (1) END_OF_FILE if test 2033 -ne `wc -c <'proto.4'`; then echo shar: \"'proto.4'\" unpacked with wrong size! fi # end of 'proto.4' fi if test -f 'queuedefs.4' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'queuedefs.4'\" else echo shar: Extracting \"'queuedefs.4'\" \(2386 characters\) sed "s/^X//" >'queuedefs.4' <<'END_OF_FILE' X.TH QUEUEDEFS 4 X.SH NAME Xqueuedefs \- queue description file for at, batch, and cron X.SH SYNOPSIS X.LP X.B /usr/lib/cron/queuedefs X.SH DESCRIPTION X.LP XThe X.B queuedefs Xfile describes the characteristics of the queues managed by X.IR cron (1M). XEach non-comment line in this file describes one queue. XThe format of the lines are as follows: X.RS X.LP X\fIq\fB.\fR[\fInjob\fBj\fR][\fInice\fBn\fR][\fInwait\fBw\fR] X.RE X.LP XThe fields in this line are: X.RS X.TP X.I q XThe name of the queue. X.B a Xis the default queue for jobs started by X.IR at (1); X.B b Xis the default queue for jobs started by X.I batch X(see X.IR at (1)); X.B c Xis the default queue for jobs run from a X.IR crontab (4) Xfile. X.TP X.I njob XThe maximum number of jobs that can be run simultaneously in that queue; if Xmore than X.I njob Xjobs are ready to run, only the first X.I njob Xjobs will be run, and the others will be run as jobs that are currently running Xterminate. The default value is 100. X.TP X.I nice XThe X.IR nice (1) Xvalue to give to all jobs in that queue that are not run with a user X.SM ID Xof super-user. The default value is 2. X.TP X.I nwait XThe number of seconds to wait before rescheduling a job that was deferred Xbecause more than X.I njob Xjobs were running in that job's queue, or because more than 25 jobs were Xrunning in all the queues. The default value is 60. X.RE X.LP XLines beginning with X.B # Xare comments, and are ignored. X.SH EXAMPLE X.RS X.nf X.ft B Xa.4j1n Xb.2j2n90w X.RE X.fi X.ft R X.LP XThis file specifies that the X.B a Xqueue, for X.I at Xjobs, can have up to 4 jobs running simultaneously; those jobs will be run with Xa X.B nice Xvalue of 1. As no X.I nwait Xvalue was given, if a job cannot be run because too many other jobs are running X.I cron Xwill wait 60 seconds before trying again to run it. XThe X.B b Xqueue, for X.I batch Xjobs, can have up to 2 jobs running simultaneously; those jobs will be run with Xa X.I nice Xvalue of 2. If a job cannot be run because too many other jobs are running, X.I cron Xwill wait 90 seconds before trying again to run it. XAll other queues can have up to 100 jobs running simultaneously; they will be Xrun with a X.I nice Xvalue of 2, and if a job cannot be run because too many other jobs are running X.I cron Xwill wait 60 seconds before trying again to run it. X.SH FILES X.PD 0 X.TP 20 X.B /usr/lib/cron/queuedefs X.PD X.SH "SEE ALSO" X.IR at (1), X.IR nice (1), X.IR crontab (4), X.IR cron (1M) END_OF_FILE if test 2386 -ne `wc -c <'queuedefs.4'`; then echo shar: \"'queuedefs.4'\" unpacked with wrong size! fi chmod +x 'queuedefs.4' # end of 'queuedefs.4' fi echo shar: End of shell archive. exit 0