title: How to stop next thread from running in a ScheduledThreadPoolExecutor
body: <p>I have a ScheduledThreadPoolExecutor which has one thread and runs for every 30 seconds.</p>
  
  <p>Now, if the current executing thread throws some exception, then I need to make sure that the next thread do not run and the the ScheduledThreadPoolExecutor is down.</p>
  
  <p>How do I achieve this?</p>