Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!wugate!wupost!kuhub.cc.ukans.edu!anu-news!list From: denver@NARDAC-NOHIMS.ARPA (DENVER BRAUGHLER) Newsgroups: news.software.anu-news Subject: Avoiding multiple simultaneous jobs... Message-ID: Date: 21 Jul 89 09:43:00 GMT Sender: ANU-NEWS Discussion Reply-To: DENVER BRAUGHLER Lines: 38 >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.