Oliver I thought about that but it wouldn't solve the problem because I don't know when exactly the process dies
On Feb 12, 2008 7:39 PM, Olivier Gies <[EMAIL PROTECTED]> wrote: > Maybe you can implement a condition to be used with Ant's core <waitfor> > task... > > Olivier > > -------- Original Message -------- > Subject: Re: Check process on remote host - Can Ant do that ? > From: Z W <[EMAIL PROTECTED]> > To: Ant Users List <user@ant.apache.org> > Date: 06/02/2008 15:10 > > Thanks for responding. > > But how do I make a conditional infinite loop with it ? > > Is there an Ant task for infinite loop ? > > > > ie > > while (1) > > { > > sshexec_check_remote_process_on_remote_host > > if (remote_process == dead) > > break; > > else > > sleep 10 mins > > } > > > > On Feb 5, 2008 3:39 PM, Charbel BITAR <[EMAIL PROTECTED]> wrote: > > > > > >> As you said use the <sshexec> task. > >> Here's an example : > >> ... > >> <property name="sshexec.host" value="" /> > >> <property name="sshexec.username" value="" /> > >> <property name="sshexec.password" value="" /> > >> <property name="sshexec.trust" value="" /> > >> <property name="sshexec.failonerror" value="" /> > >> <property name="sshexec.timeout" value="" /> > >> <property name="sshexec.command" value='ps -ef | cut -d" " -f5 | grep > >> 11875' > >> /> > >> ... > >> <target name="sshexec" description="SSHExec"> > >> <sshexec host="${sshexec.host}" username="${sshexec.username}" > >> password="${ > >> sshexec.password}" trust="${sshexec.trust}" failonerror="${ > >> sshexec.failonerror}" timeout="${sshexec.timeout}" command="${ > >> sshexec.command}" outputproperty="sshexec.outputproperty" /> > >> ...Use a condition to check that ${sshexec.outputproperty} !equals the > >> empty > >> string... > >> </target> > >> ... > >> > >> HTH > >> -- > >> Charbel > >> > >> > >> > >> On Feb 5, 2008 11:24 PM, Z W <[EMAIL PROTECTED]> wrote: > >> > >> > >>> Hi > >>> > >>> I have an ant script that needs to check the status of a process > running > >>> on > >>> a remote machine and if the > >>> process has stopped running, I like the Ant script the ability to know > >>> that > >>> and move on to the next step in Ant script. > >>> Could someone here give a simple example on how to implement that ? > >>> I have some idea of using sleep to periodically check for a remote > >>> > >> process > >> > >>> but > >>> is there an Ant task or a workaround that I could implement to check > the > >>> process using ps ? > >>> I'm not sure sshexec could help me with that. > >>> > >>> Thank you all for your helpful tips and comments > >>> > >>> > > > > > > -- > > *Olivier Gies* > > *Delivery Manager > Customs & Tax Software Engineering Center > Bull, Architect of an Open World ^TM > Phone: +86 (10) 65978001 - Ext 555 * > > *www.bull.com <http://www.bull.com/>* > > *This e-mail contains material that is confidential for the sole use of > the intended recipient. Any review, reliance or distribution by others > or forwarding without express permission is strictly prohibited. If you > are not the intended recipient, please contact the sender and delete all > copies.* > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >