Menu
How can I schedule a function to run one hour after a specified time?
[CODE]
var custom_time = “2013-11-09T19:06:27-06:00”;
schedule(custom_time, 60, script());
function script() {
// Would run code here after 60 minutes
}
Of course, “schedule()” doesn’t exist, I just put this here to show what I want to accomplish. I have MomentJs already in use on my site, and you can use it to manipulate the time if you need to. The provided time is in a ISO-8601 format (so it is compatible with MomentJs).