How to reload a page at certain hour and only once a day
<p>I have a javascript function that runs every one minute.</p>

<pre><code>setInterval(function(){

  //first, check time, if it is 9 AM, reload the page
   var now = new Date();
   if (now.getHours() == 9 {
      window.refresh();
   }

  //do other stuff

},60000);
</code></pre>

<p>Now the problem is, I want the reload to happen only once a day. since the function runs every minutes, so next time it fires up, it will reload the page again if it is between 9AM and 10AM. How do I make the reload happen only once?</p>

<p>I can probably do it by creating another interval function that fires every hour and check if I should reload. but since I already have the above function that runs every minute, can I do it from there?</p>

<p>If I do end up with creating another function that checks every hour. What will happen if those 2 functions fire up at the exact same time?</p>
