Created
July 22, 2019 17:06
-
-
Save gbelot2003/a2366a25dd12f56083f23ac6bea2be12 to your computer and use it in GitHub Desktop.
Funcion de envio de post acada x tiempo
This file contains 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
(function schedule() { | |
background.asyncStuff().then(function() { | |
console.log('Process finished, waiting 5 minutes'); | |
setTimeout(function() { | |
console.log('hacer post cada 5 minutos'); | |
this.post("/url/para/ejecutar/logs") | |
}, 1000 * 60 * 5); | |
}).catch(err => console.error('error in scheduler', err)); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment