Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi I have a file which includes

Status
Not open for further replies.

vti

Technical User
Feb 26, 2001
189
TR
Hi

I have a file which includes batch file names like :
-----------
car.cc
table.cc
motor.cc
bike.cc
planet.cc
month.cc
-----------

and it works everday.But i would like to check that ,for example when month.cc start to run it must check the all job which are supposed to runs before month.cc.And must check if they run before or not.Every single job must check before jobs which has to work before .if not it must stop running and must give me error message.

I though a way to put all jobname a file and put something in top of every single batch file that when it runs go to that file and check are there job names which are has to work before ?But how.?

Sorry about my explanation .I know it's confusing but i have tried to explain ..

Thanks for any help.
 
when the first script ends, you can "touch" a file (in this case we will call the file = job_ended).
When the following script starts, it should check fot the presence of that file, and if not it should loop until present. It would be a good idea to include a sleep in your loop so that it does not grab the whole cpu.

ex :
while (-e /tmp/job_ended) do
sleep 30
end.


You could also have a main script call all the other scripts one after the other.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top