title: Calendar, execute code every 24 hours
body: <p>I would like to execute a piece of code every 24 Hours however I'm not sure how to do this.
  I have some code that sets the time that I would like the cycle to start but not sure how to execute the end time</p>
  
  <pre><code>    int startDay = 00; // 12am
      int end = 24; // 12 pm
      int hours = (end - startDay) % 24; //difference will be 24 hours
  
      Calendar calInstanceOne = Calendar.getInstance();
  
      // set calendar to 12 am
      calInstanceOne.set(Calendar.HOUR_OF_DAY, startDay);
      calInstanceOne.set(Calendar.MINUTE, 0);
      calInstanceOne.set(Calendar.SECOND, 0);
      calInstanceOne.set(Calendar.MILLISECOND, 0);
  </code></pre>
  
  <p>Do I create another Calendar instance, set to 12pm? and compare the two? Would really appreciate any insight into this.</p>