Monitoring job

This commit is contained in:
baldo 2016-05-24 23:32:04 +02:00
commit 5ff76db5a9
5 changed files with 380 additions and 155 deletions

View file

@ -0,0 +1,13 @@
'use strict';
angular.module('ffffng').factory('MonitoringMailsSendingJob', function (MonitoringService, Logger) {
return {
run: function () {
MonitoringService.sendMonitoringMails(function (err) {
if (err) {
Logger.tag('monitoring', 'mail-sending').error('Error sending monitoring mails:', err);
}
});
}
};
});

View file

@ -31,7 +31,8 @@ angular.module('ffffng').factory('Scheduler', function ($injector, Logger, confi
schedule('0 */1 * * * *', 'MailQueueJob');
if (config.client.monitoring.enabled) {
schedule('30 */5 * * * *', 'NodeInformationRetrievalJob');
schedule('30 */15 * * * *', 'NodeInformationRetrievalJob');
schedule('45 */5 * * * *', 'MonitoringMailsSendingJob');
schedule('0 0 3 * * *', 'NodeInformationCleanupJob'); // every night at 3:00
}
}