title: ScheduledExecutorService execute every night at 12 AM UTC Time
body: <p>I want to start   ScheduledExecutorService  exactly 12 AM daily ,Schedule has to Start at today at 22/02/2017 00:00:00 (UTC TIME),Can any one tell me Whether my code is Correct or not?</p>
  <pre class="lang-java prettyprint-override"><code>DateTime today = new DateTime().withTimeAtStartOfDay(); 
  DateTime startOfTommorrow = today.plusDays(1).withTimeAtStartOfDay();
  
  Long midnight = startOfTommorrow.getMillis();
  long midnights = (midnight / 1000)  / 60;
  final DateFormat nextDateTymFormat = new SimpleDateFormat(&quot;yyyy-MM-dd HH:mm:ss&quot;);
  
  System.out.println(&quot;***********************************&quot;);
  System.out.println(&quot;Schedule Updater &quot;+nextDateTymFormat.format(new Date()));
  System.out.println(&quot;today &quot;+today);
  System.out.println(&quot;startOfTommorrow &quot;+startOfTommorrow);
  System.out.println(&quot;midnight Long &quot;+midnight);
  System.out.println(&quot;***********************************&quot;);
  vitalScheduleThread.scheduleAtFixedRate(new Runnable() {
  
      @Override
      public void run() {
  
          System.out.println(&quot;Hello vitalSchService !!&quot;+nextDateTymFormat.format(new Date()));
  
          Thread.currentThread().setName(&quot;vitalSchService&quot;);
  
          //sendMail();
          vitalSchedule.process(springContext);
      }
  }, midnight , 86400000 , TimeUnit.MILLISECONDS
  );
  </code></pre>