<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
<button>bla-bla</button>
<script>
var button = document.getElementsByTagName("button")[0];
button.addEventListener("click", function() {
alert("Click")
});
function calculator() {
var now = new Date,
date = (new Date).setHours(12, 0, 0, 0);
now > date && date.setDate(date.getDate() + 1);
setTimeout(go, date - now)
}
function go() {
button.click();
calculator();
}
calculator();
</script>
</body>
</html>