Last active
May 2, 2017 14:20
-
-
Save amuntasim/d8ec7bcc1ac7447c9026c466cad7dc37 to your computer and use it in GitHub Desktop.
Revisions
-
amuntasim revised this gist
May 2, 2017 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ var triggered = false; (function loop() { var now = new Date(); // here the method will be triggered at 20:28, you can change them as per your need @@ -11,4 +10,3 @@ function delayed(method) { console.log('Now: ' + now.getHours() + ':' + now.getMinutes() + ':' + now.getSeconds()); setTimeout(loop, 200); })(); -
amuntasim created this gist
Apr 30, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ var triggered = false; function delayed(method) { (function loop() { var now = new Date(); // here the method will be triggered at 20:28, you can change them as per your need if (!triggered && now.getHours() === 20 && now.getMinutes() === 28) { method(); triggered = true; } console.log('Now: ' + now.getHours() + ':' + now.getMinutes() + ':' + now.getSeconds()); setTimeout(loop, 200); })(); }