Skip to content

Instantly share code, notes, and snippets.

@pirosuke
Created January 19, 2019 11:21
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 pirosuke/1003f812bec0b9f1855245ef0018c554 to your computer and use it in GitHub Desktop.
Save pirosuke/1003f812bec0b9f1855245ef0018c554 to your computer and use it in GitHub Desktop.
Example Using node-cron
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