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 > > >