Call a javascript function at a specific time of day
<p>for example i want to call a js function at 10.00.00.00 am 
how can i do?</p>

<pre><code>&lt;script type="text/javascript"&gt;

var now = new Date();

var millisTill10 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 30, 0, 0) - now;

setTimeout(function{openAPage(), setInterval(openAPage, 60*1000)}, millisTill10)

function openAPage() {

var startTime = new Date().getTime();
var myWin = window.open("http://google.com","_blank")
var endTime = new Date().getTime();
var timeTaken = endTime-startTime;


document.write("&lt;br&gt;button pressed@&lt;/br&gt;")
document.write(new Date(startTime));
document.write("&lt;br&gt;page loaded@&lt;/br&gt;")
document.write(new Date(endTime));
document.write("&lt;br&gt;time taken&lt;/br&gt;")
document.write(timeTaken);

myWin.close()

}

&lt;/script&gt;
</code></pre>

<p>i expect from this code at 00.30 it will open google and then every 1 minute later it will do it again? whats wrong with that code?</p>
