Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!wugate!wupost!kuhub.cc.ukans.edu!sloane From: SLOANE@kuhub.cc.ukans.edu (Bob Sloane) Newsgroups: news.software.anu-news Subject: Re: QUEUE checking for hourly SKIM Message-ID: <5673@kuhub.cc.ukans.edu> Date: 17 Jul 89 21:49:06 GMT References: <34@mscf.med.upenn.edu> Organization: University of Kansas Academic Computing Services Lines: 24 > We ran into the following problem yesterday. We have a batch job > called HOURLY.COM which runs every hour to SKIM. The first line of > HOURLY.COM is a SUBMIT commmand to resubmit HOURLY at time+1 hr. The problem > occured when the server that we access went down and the first hourly job was > not completed when the second one started running. Then in a short time we > had 3 of these hourly jobs running at once. > 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? There are a couple of different ways you can synchronize these batch jobs. I suspect the command you want to use is the SYNCHRONIZE DCL command. You can say "SYNC /QUE=" and the job issuing the SYNC command will wait until the specified job is finished. Another possibility is to do use the "SET PROCESS/NAME=HOURLY_SKIM" command near the beginning of the batch file. This command will die with a fatal error if there is another user in the same group with a process name of HOURLY_SKIM, causing the job to delete. I have used this method occasionally, but I would recommend using the SYNC command for what you want to do. +-------------------+-------------------------------------+------------------+ | Bob Sloane \Internet: SLOANE@KUHUB.CC.UKANS.EDU/Anything I said is | | Computer Center \ BITNET: SLOANE@UKANVAX.BITNET / my opinion, not my | | University of Kansas\ AT&T: (913) 864-0444 / employer's. | +-----------------------+-----------------------------+----------------------+