refresh page for a given time range
<p>I have a website that I want to be reloaded at a given range of time in the day for every five minute. time, like 9:00am to 12:00am every five minute. How do I do that?</p>

<pre><code>    function refreshAt(hours, minutes, seconds) {
    var now = new Date();
    var then = new Date();

    if(now.getHours() &gt; hours ||
       (now.getHours() == hours &amp;&amp; now.getMinutes() &gt; minutes) ||
        now.getHours() == hours &amp;&amp; now.getMinutes() == minutes &amp;&amp; now.getSeconds() &gt;= seconds) {
        then.setDate(now.getDate() + 1);
    }
    then.setHours(hours);
    then.setMinutes(minutes);
    then.setSeconds(seconds);

    var timeout = (then.getTime() - now.getTime());
    setTimeout(function() { window.location.reload(true); }, timeout);
}refreshAt(15,35,0); //Will refresh the page at 3:35pm
</code></pre>

<p>the following is just for a given time</p>
