Created
October 11, 2017 15:42
-
-
Save availit/4c44af2087c0ef76ce12358f831f918a to your computer and use it in GitHub Desktop.
jQuery Epoch Timestamp Trigger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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