Re: Waiting for exec task to succeed

2007-05-25 Thread Krish
Yea...thats what i am doing now :)...Seems easier that way Thanks much K --- David Weintraub [EMAIL PROTECTED] wrote: Why not write a shell script and then have the shell script execute the loop? All the exec task would have to do is execute the shell script. The shell script can return a

Re: Waiting for exec task to succeed

2007-05-25 Thread Steve Loughran
Alexey N. Solofnenko wrote: There is socket to check for ports, but no while. I would suggest using scriptdef and write it in a code. There is waitfor, that blocks until a condition is met waitfor maxwait=20 maxwaitunit=second checkevery=500 not socket port=8080 server=localhost /

Waiting for exec task to succeed

2007-05-24 Thread Krish
Hi I have a requirement wherein I need to make sure the process doesnt exist. So I need to do something like this - `netstat -tln | grep 8080 | cut -f1 -d'. If the return value of the above is tcp, then i know that a process is running . I need to run this command in a loop until the

Re: Waiting for exec task to succeed

2007-05-24 Thread Doug Lochart
I may be being a bit picky but I would not key on a port (which could change in a config file) I would target the process name itself with ps or pgrep myself. I haven't done any serious ant dev in a while (my build scripts work fine =) but if you have exhausted the core and contrib tasks then

Re: Waiting for exec task to succeed

2007-05-24 Thread Alexey N. Solofnenko
There is socket to check for ports, but no while. I would suggest using scriptdef and write it in a code. - Alexey. Krish wrote: Hi I have a requirement wherein I need to make sure the process doesnt exist. So I need to do something like this - `netstat -tln | grep 8080 | cut -f1 -d'. If

Re: Waiting for exec task to succeed

2007-05-24 Thread Alexey N. Solofnenko
Please also look for retry task in this mailing list. - Alexey. Alexey N. Solofnenko wrote: There is socket to check for ports, but no while. I would suggest using scriptdef and write it in a code. - Alexey. Krish wrote: Hi I have a requirement wherein I need to make sure the process

Re: Waiting for exec task to succeed

2007-05-24 Thread David Weintraub
Why not write a shell script and then have the shell script execute the loop? All the exec task would have to do is execute the shell script. The shell script can return a non-zero exit code on failure. On 5/24/07, Krish [EMAIL PROTECTED] wrote: Hi I have a requirement wherein I need to make