Updates to event scheduler

This commit is contained in:
Bryan Ashby 2016-09-13 21:44:35 -06:00
parent 70d1eb8d91
commit e90cf673e3
2 changed files with 4 additions and 0 deletions

View File

@ -142,6 +142,8 @@ function initialize(cb) {
process.on('SIGINT', shutdownSystem);
require('later').date.localTime(); // use local times for later.js/scheduling
return callback(null);
},
function initDatabases(callback) {

View File

@ -11,6 +11,7 @@ const later = require('later');
const path = require('path');
const pty = require('ptyw.js');
const gaze = require('gaze');
const moment = require('moment');
exports.getModule = EventSchedulerModule;
exports.EventSchedulerModule = EventSchedulerModule; // allow for loadAndStart
@ -214,6 +215,7 @@ EventSchedulerModule.prototype.startup = function(cb) {
eventName : schedEvent.name,
schedule : this.moduleConfig.events[schedEvent.name].schedule,
action : schedEvent.action,
next : moment(later.schedule(schedEvent.schedule.sched).next(1)).format('ddd, MMM Do, YYYY @ h:m:ss a')
},
'Scheduled event loaded'
);