ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knuplesch, Juergen" <Juergen.Knuple...@icongmbh.de>
Subject AW: AW: How to wait for completion of execution of batch file ?
Date Tue, 02 Sep 2008 08:55:14 GMT
When the batch file is finished, ANT can go on, or does the batch file start ther servers asynchron?

What you can do is a kind of polling with Ant. I used the following using antcontrib. I start
an asynchron server and have to check if the server is started. Therfore I use the following:


  <waitfor maxwait="5" maxwaitunit="minute"
               checkevery="500" checkeveryunit="millisecond"
		    			 timeoutproperty="noserverfound">
          <socket port="${port}" server="localhost"/>
      </waitfor>

So if your serverstartprocess starts a process at a defined address, you can check it.

Greetings


-- 
Jürgen Knuplesch

-----Ursprüngliche Nachricht-----
Von: sactiw [mailto:stiwari@nvidia.com] 
Gesendet: Dienstag, 2. September 2008 10:09
An: user@ant.apache.org
Betreff: Re: AW: How to wait for completion of execution of batch file ?


Thanks for the reply JK.

Yeah I know that it is not the default behaviour of exec or sshexec task.

I am using exec to start my batch file execution, that batch file actually reboots certain
machines now I want to wait until all of those machines get rebooted.

For that I feel I need to make ANT execution wait for that batch file execution to get complete.
Any idea that apart from using some kind of time out what else I can do to achieve that.

-Sactiw

Knuplesch, Juergen wrote:
> 
> Isn't that the default behaviour of the exec task? 
> 
> How do you start your Batchfile?
> 
> 
> -- 
> Jürgen Knuplesch                    www.icongmbh.de
> icon Systemhaus GmbH                Tel. +49 711 806098-275
> Sophienstraße 40                    
> D-70178 Stuttgart                   Fax. +49 711 806098-299
> 
> Geschäftsführer: Uwe Seltmann
> HRB Stuttgart 17655
> USt-IdNr.: DE 811944121
> -----Ursprüngliche Nachricht-----
> Von: sactiw [mailto:stiwari@nvidia.com]
> Gesendet: Montag, 1. September 2008 20:02
> An: user@ant.apache.org
> Betreff: How to wait for completion of execution of batch file ?
> 
> 
> Hi Guys,
>            I am executing a batch file via Ant using "exec" task. 
> Could anyone tell tell me some way in which I can stop Ant's execution 
> till the execution of batch files doesn't get completed. I don't want 
> to use a time-out trick for it as I don't know that how much time that 
> scriot might take to complete.
> 
> In short I want that my Ant execution should wait for completion of 
> the batch file that it has executed using exec task.
> 
> Thanks and Regards,
> Sactiw.
> --
> View this message in context:
> http://www.nabble.com/How-to-wait-for-completion-of-execution-of-batch
> -file---tp19258525p19258525.html Sent from the Ant - Users mailing 
> list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional 
> commands, e-mail: user-help@ant.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional 
> commands, e-mail: user-help@ant.apache.org
> 
> 
> 

--
View this message in context: http://www.nabble.com/How-to-wait-for-completion-of-execution-of-batch-file---tp19258525p19265859.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message