Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Timeout for START  (Read 3800 times)

0 Members and 1 Guest are viewing this topic.

Batch_Lamer

  • Guest
Timeout for START
« on: September 21, 2004, 04:15:23 AM »
Hi All,

I'm launching an executable in a batch file using

START /WAIT

The /WAIT option is necesary, as I have to wait for the executable to write some data before continuing. HOWEVER, sometimes the executable gets stranded, so the rest of my batch file never gets executed, they keep on waiting for ever for the stranded executable.

How do I build in a time out for this???

(Something like a maximum execution time and if this time is passed then break and close the program)

merlin_2

  • Guest
Re: Timeout for START
« Reply #1 on: September 21, 2004, 02:17:26 PM »
you may find something here>http://www.robvanderwoude.com/index.html   i would have pause instead of wait?

Batch_Lamer

  • Guest
Re: Timeout for START
« Reply #2 on: September 22, 2004, 02:12:48 AM »
I already looked on this page of Rob, but didn't find anything.

Using PAUSE is an option of course, but that will give the same long (maximum) executable time for every run of the executable. With this I'll lose a lot of time, 'cause the time it takes for the executable to do the calculations differs quite a lot for every run, it's a last resoure to use PAUSE.

Are there really no other options?

MalikTous

  • Guest
Re: Timeout for START
« Reply #3 on: September 23, 2004, 12:55:41 PM »
Search one of the freeware utility sites for DOS tools, you want a 'pause' utility you can set to time out and resume the program/batch string. It will 'wait' for a specified amount of time before allowing the host program to resume...

Batch_Lamer

  • Guest
Re: Timeout for START
« Reply #4 on: September 24, 2004, 02:27:02 AM »
Yes, in fact my previous answer to PAUSE option doesn't hold really. I thought that PAUSE was for a certain given time, but it's just a function to wait until you press a key. This will never do, 'cause it has to be automatic, if I have to wait and to press a key, I could do every run by hand :-(

I'm going to see these freeware DOS tools