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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch files

Status
Not open for further replies.

LawnBoy

MIS
Mar 12, 2003
2,881
Trying to write an ncf that calls the same nlm repeatedly (with different switches). Problem is the nlm is not multiple. Is there a way to cause the batch file to execute 1 line and wait for it to finish before executing the next line? My ncf is:

trustbar sys: -B
trustbar home: -B
trustbar data: -B
etc.

The 2nd (and subsequent) lines fail with "Trustbar.nlm not multiple".
 
a ?
in front delays by 10 seconds
or cron it with 5 mins interval or something like that
 
10 sec. wasn't long enough. I did find the DELAY cmd, usage:
DELAY [1-300 seconds]

 
trustbar sys: -B
delay 90
trustbar home: -B
delay 90
trustbar data: -B


delay is really a command in 6.5

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
Brent Schmidt Certified nut case [hippy]
Senior Network Engineer
Keep IT Simple
 
Yeah, that's what I've got working. 30 sec. is enough for everything but my home volume so I put it last. Good enough.
 
Lol, I just made the stupidest mistake I've made in years. In my infinite wisdom, I named the script trustbar.ncf and guess what? Infinite recursion.
<slapforehead> D'oh! </slapforehead>
Good thing it wasn't on a production server, the only way out I found was a shutdown.

Just for future reference, how can you break out of a batch file? CTRL-BRK doesn't do it.
 
Provo,
Yep, that document is where I saw the delay cmd, they use it in an example.
 
Lawnboy - you could always rename the NCF file from a workstation cause then it cannot find it to call it again and again!

-----------------------------------------------------
&quot;It's true, its damn true!&quot;
-----------------------------------------------------
 
Hey, I've noticed that! Even though the script is in sys:system sometimes I have to give the full path at the console. Sometimes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top