title: Trying to call a function every 24 hours
body: <p>I'm trying to get a function to be called every day.  Right now my code is as follows:</p>
  
  <pre><code>do {
      Thread.sleep(1000*60*60*24);
      readInFile();
  } while (true);
  </code></pre>
  
  <p>The issue is that it is being called every day plus the time it takes to execute the function <code>readInFile</code>.  Is there a way to do a callback or something to go off every 24 hours?</p>