Skip to content

Instantly share code, notes, and snippets.

@availit
Created October 11, 2017 15:48
Show Gist options
  • Save availit/d7d6da628505b87cf1d2f08fa121012c to your computer and use it in GitHub Desktop.
Save availit/d7d6da628505b87cf1d2f08fa121012c to your computer and use it in GitHub Desktop.
// set trigger time using https://www.epochconverter.com/ (know the trigger time in GMT)
triggerTime(1496300400000);
function run_script (){
// put your logic here
}
// No need to alter any of this.
function triggerTime(trigger) {
var now = new Date().getTime();
var timeout = ( trigger - now );
setTimeout(function() {
run_script()
}, timeout);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment