How can I run a function at a given time and date?
Example: I have a function that needs to run on the 12th of each month at 10AM.
This page will be running
You can use something like this
var runned = false; var d = new Date(); if(d.getDate() == 12 && d.getHours() == 10 && !runned){ //Do some magic runned = true; }
If you want some with the minute (and not the whole hour you can add d.getMinutes()