title: Looping not executing properly in Groovy Script
body: <p>I have groovy code snippet consisting of "For Loop". Inside for loop im checking condition and in else part Im adding Thread.sleep(300000) (5 mins of waiting).</p>
  
  <pre><code>for(int i=0; i&lt;8;i++) {
    if(i == 6){
       print 'Condition True'
       break;
    } else {
       try
       {
        Thread.sleep(300000)
       } catch(e) {
            Thread.currentThread().interrupt();
            continue;
       }
  }
  }
  </code></pre>
  
  <p>Case 1: After running this sample script, In the 1st iteration it is waiting for 5 mins, after that the loop is terminating itself. How can i wait for 30 mins with the intervals of 5 mins,</p>
  
  <p>Case 2: If I add println 'Printing' in else part, then in 1st iteration it is waiting 5 mins after that is it waiting with 5 sec. How can i wait for 30 mins with the intervals of 5 mins.</p>