Created
January 19, 2019 11:21
-
-
Save pirosuke/1003f812bec0b9f1855245ef0018c554 to your computer and use it in GitHub Desktop.
Example Using node-cron
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
const cron = require('node-cron'); | |
const exampletask = require('./exampletask'); | |
cron.schedule('0 9 * * * *', () => { | |
exampletask.main(); | |
console.log('task completed'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment