|
|
@ -32,28 +32,28 @@ module.exports = function (User) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
winston.verbose('[user/jobs] ' + terminated + ' jobs terminated');
|
|
|
|
winston.verbose('[user/jobs] ' + terminated + ' jobs terminated');
|
|
|
|
|
|
|
|
|
|
|
|
jobs['digest.daily'] = new cronJob('0 0 ' + digestHour + ' * * *', function () {
|
|
|
|
jobs['digest.daily'] = new cronJob('0 ' + digestHour + ' * * *', function () {
|
|
|
|
winston.verbose('[user/jobs] Digest job (daily) started.');
|
|
|
|
winston.verbose('[user/jobs] Digest job (daily) started.');
|
|
|
|
User.digest.execute('day');
|
|
|
|
User.digest.execute('day');
|
|
|
|
}, null, true);
|
|
|
|
}, null, true);
|
|
|
|
winston.verbose('[user/jobs] Starting job (digest.daily)');
|
|
|
|
winston.verbose('[user/jobs] Starting job (digest.daily)');
|
|
|
|
++started;
|
|
|
|
++started;
|
|
|
|
|
|
|
|
|
|
|
|
jobs['digest.weekly'] = new cronJob('0 0 ' + digestHour + ' * * 0', function () {
|
|
|
|
jobs['digest.weekly'] = new cronJob('0 ' + digestHour + ' * * 0', function () {
|
|
|
|
winston.verbose('[user/jobs] Digest job (weekly) started.');
|
|
|
|
winston.verbose('[user/jobs] Digest job (weekly) started.');
|
|
|
|
User.digest.execute('week');
|
|
|
|
User.digest.execute('week');
|
|
|
|
}, null, true);
|
|
|
|
}, null, true);
|
|
|
|
winston.verbose('[user/jobs] Starting job (digest.weekly)');
|
|
|
|
winston.verbose('[user/jobs] Starting job (digest.weekly)');
|
|
|
|
++started;
|
|
|
|
++started;
|
|
|
|
|
|
|
|
|
|
|
|
jobs['digest.monthly'] = new cronJob('0 0 ' + digestHour + ' 1 * *', function () {
|
|
|
|
jobs['digest.monthly'] = new cronJob('0 ' + digestHour + ' 1 * *', function () {
|
|
|
|
winston.verbose('[user/jobs] Digest job (monthly) started.');
|
|
|
|
winston.verbose('[user/jobs] Digest job (monthly) started.');
|
|
|
|
User.digest.execute('month');
|
|
|
|
User.digest.execute('month');
|
|
|
|
}, null, true);
|
|
|
|
}, null, true);
|
|
|
|
winston.verbose('[user/jobs] Starting job (digest.monthly)');
|
|
|
|
winston.verbose('[user/jobs] Starting job (digest.monthly)');
|
|
|
|
++started;
|
|
|
|
++started;
|
|
|
|
|
|
|
|
|
|
|
|
jobs['reset.clean'] = new cronJob('0 0 0 * * *', User.reset.clean, null, true);
|
|
|
|
jobs['reset.clean'] = new cronJob('0 0 * * *', User.reset.clean, null, true);
|
|
|
|
winston.verbose('[user/jobs] Starting job (reset.clean)');
|
|
|
|
winston.verbose('[user/jobs] Starting job (reset.clean)');
|
|
|
|
++started;
|
|
|
|
++started;
|
|
|
|
|
|
|
|
|
|
|
|