Created
November 25, 2019 20:43
-
-
Save theouerd/ea801d8cf0eab49033674b58c4bd2085 to your computer and use it in GitHub Desktop.
a configuration file that specifies shell commands to run periodically on a given schedule.
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
const CronJob = require('cron').CronJob; | |
const Cron = require('./backup.js'); | |
// AutoBackUp every week (at 00:00 on Sunday) | |
new CronJob( | |
'0 0 * * 0', | |
function() { | |
Cron.dbAutoBackUp(); | |
}, | |
null, | |
true, | |
'America/New_York' | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment