title: Schedule something for a specific time in Java?
body: <p>I need to run a scheduled task at a specific time every day.</p>
  
  <p>I have this so far:</p>
  
  <pre><code>Date timeToRun = new Date(System.currentTimeMillis());
  Timer myTimer = new Timer();
  
  myTimer.schedule(new TimerTask() {
      public void run() {
          //Method to run
      }
  }, timeToRun);
  </code></pre>
  
  <p>How would I set <code>timeToRun</code> to a specific time? So that I can run this code on any particular date, and it would run the task at the correct time; e.g. 7:30pm every day.</p>