Is it possible with javascript (jQuery solutions are fine too) to fire an event/call a function at certain times of the day e.g.
call myFunctionA at 10:00
ca
4html:
current date:
time to Alarm:
alarm Triggered: false
javascript:
var setAlarm1 = "14"; //14:00, 2:00 PM
var int1 = setInterval(function(){
var currentHour = new Date().getHours();
var currentMin = new Date().getMinutes();
$('#cd').html(currentHour + ":" + currentMin );
$('#al1').html(setAlarm1 - currentHour + " hours");
if(currentHour >= setAlarm1){
$('#al1stat').html(" true");
clearInterval(int1);
//call to function to trigger : triggerFunction();
}
},1000) //check time on 1s
Sample at: http://jsfiddle.net/yhDVx/4/