title: Java scheduleAtFixedRate stops working after 2 times
body: <p>I have this code: </p>
  
  <pre><code>    exec = Executors.newSingleThreadScheduledExecutor();
      exec.scheduleAtFixedRate(new Runnable() {
        @Override
        public void run() {
            System.err.println("Getting messages....");
            getNewMessagesAndAddToTextArea();
        }
      }, 0, GET_MESSAGE_INTERVAL, TimeUnit.SECONDS);
  </code></pre>
  
  <p>exec is in my class declared as:
      private ScheduledExecutorService exec;</p>
  
  <p>I'm getting the "Getting messages...." messages 2 times and then it stops. I can't explain why. The GUI is still working. So what happened here?</p>