title: Scheduling a Callable at a fixed rate
body: <p>I have a task that I want to run at a fixed rate. However I also need the result of the task after each execution. Here is what I tried:</p>
  
  <p>The task</p>
  
  <pre><code>class ScheduledWork implements Callable&lt;String&gt;
  {
      public String call()
      {
          //do the task and return the result as a String
      }
  }
  </code></pre>
  
  <p>No I tried to use the <code>ScheduledExecutorService</code> to scheduled it. Turns out you cannot schedule a <code>Callable</code> at a fixed rate, only a <code>Runnable</code> can be done so.</p>
  
  <p>Please advise.</p>