something like

import jenkins.model.*;
for (slave in Jenkins.instance.slaves) {
  def comp=slave.computer;
  if (comp.isOffline()) {
    if (comp.getOfflineCauseReason().matches(".*computer was idle.*")) {
      comp.connect(true);
    } else {
      println("${comp.name} went offline unexpected");
    }
  }
}

On 2014-10-17 22:29, [email protected] wrote:


On Friday, October 17, 2014 11:09:04 AM UTC-7, [email protected] wrote:

    Hi

    I need to disconnect and reconnect  nodes programmatically ( in
    groovy if possible) is there a way to do this?

    Thanks
    Peter

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to