denver@NARDAC-NOHIMS.ARPA (DENVER BRAUGHLER) (07/21/89)
>In article <2753@zeus.unl.edu>, UNOCC07@UNOMA1.BITNET (Dave Caplinger) writes: >>> Does anybody know an easy way to modify the com file so that it can >>> dectect if another HOURLY job is still executing and if so, how to resubmit >>> the next job for a later time? >> >> How about moving the SUBMIT command to the end of the HOURLY.COM? How about running every thing thru a separate batch queue, say, anu_que? $INIT/BATCH/QUE ANU_QUE/JOB_LIMIT=1 !/RETAIN=ERROR Then at the TOP of the program $ SHO QUE ANU_QUE/ALL/OUTPUT=Q.LIS 1) $ SEARCH/out=q2.lis Q.lis jobname $ SEARCH Q2.LIS pending $ IF $SEVERITY.ne.3 Then... $ SEARCH Q2.LIS holding $ IF $SEVERITY.ne.3 Then... or, more sophisticatedly 2) $OPEN/READ/ERROR=... q q.lis $READ/end=... q line !skip header lines at the top $READ/end=... q line $READ/end=... q line $LOOP: $READ/end=... q line $if f$extract(,,line)... !look for another job by the same name that is !already queued $goto loop And use submit/restart=anu_que and set restart_value so that if the system crashes after execution begins, but before resubmitting, a clean recovery will take place.
EALYON@SUNRISE.BITNET (Edward A. Lyon) (07/22/89)
> Date: Fri, 21 Jul 89 05:43:00 EDT > From: DENVER BRAUGHLER <denver@NARDAC-NOHIMS.ARPA> > >>In article <2753@zeus.unl.edu>, UNOCC07@UNOMA1.BITNET (Dave Caplinger) writes: >>>> Does anybody know an easy way to modify the com file so that it can >>>> dectect if another HOURLY job is still executing and if so, how to resubmit >>>> the next job for a later time? >>> How about moving the SUBMIT command to the end of the HOURLY.COM? > > How about running every thing thru a separate batch queue, say, anu_que? > $INIT/BATCH/QUE ANU_QUE/JOB_LIMIT=1 !/RETAIN=ERROR > Then at the TOP of the program $ SHO QUE ANU_QUE/ALL/OUTPUT=Q.LIS > [and SEARCHing or READing the output to parse it for relevant information] Why not use the F$GetQUI lexical function that comes with VMS V5.0? If you're running NEWS 5.8 or later, you have to have V5, anyway.