Created
July 16, 2018 13:41
-
-
Save avermeulen/f94271aaa2c5eb9589856a646d44c486 to your computer and use it in GitHub Desktop.
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
var schedule = require('node-schedule'); | |
schedule.scheduleJob( process.env.SCHEDULE_SETTINGS || '00 00 6 * * *', function(runAt){ | |
console.log(runAt); | |
// is this the last day of the month? | |
// if it is... call the function to create the metric instances | |
// let taskList = getAllTasks(); | |
// taskList.forEeach((task) => { | |
// try { | |
// if (task.active()){ | |
// task.execute(); | |
// } | |
// } | |
// catch(err){ | |
// // log any errors! | |
// } | |
// }) | |
createMetricRequests(endOfMonthDate); | |
sendEmailRemindersForOpenMetricRequests(endOfMonthDate); | |
console.log('The answer to life, the universe, and everything!'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment