title: How can I run a JavaScript function at specified times of the day?
body: <p>I need to run a function every 16 minutes but not when user goes to page, rather at a specific time.</p>
  
  <p>For example: 12:01, 12:16, 12:31, 12:46, 13:01, 13:16, 13:31 and so on...</p>
  
  <p>How do I do that?</p>
  
  <pre><code>updateTodayCharts = setInterval(function () {
      ajax_update( date1 , date2 );
  }, 15 * 60 * 1000);
  </code></pre>
  
  <p>This script runs <code>ajax_update</code> every 15 minutes. When you visit the page at 12:20 it runs at 12:35 (12:20 + 15 minutes).</p>
  
  <p>I need to run this script at 12:36 (so after 11 minutes not 15)</p>
  
  <p>First i will calculate time from now to next update and then set timeinterval time.</p>