title: Difference between TimerTask and Executors.newScheduledThreadPool(1)
body: <p>I need to schedule some work to be done in the future. I can do it in 2 ways:</p>
  
  <ol>
  <li><p>Create a <code>TimerTask</code> and execute <code>timer.schedule(...);</code></p></li>
  <li><p>Use <code>Executors.newScheduledThreadPool(1)</code>:</p>
  
  <pre><code>ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
  ScheduledFuture &lt;?&gt; scheduleHandle = scheduler.schedule(pushExternalRunnable,  
          runScheduleDate.getTime() - now.getTime(), TimeUnit.MILLISECONDS);
  </code></pre></li>
  </ol>
  
  <p>What is the difference between these 2 ways of scheduling the work in the future?</p>