Skip to content

Instantly share code, notes, and snippets.

@availit
Created October 11, 2017 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save availit/4c44af2087c0ef76ce12358f831f918a to your computer and use it in GitHub Desktop.
Save availit/4c44af2087c0ef76ce12358f831f918a to your computer and use it in GitHub Desktop.
jQuery Epoch Timestamp Trigger
// 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