Commit 9fbc1e7c authored by Curtis Adam's avatar Curtis Adam

Update the name of cronjob execution setting

parent ccca23e4
......@@ -139,10 +139,10 @@ Template.registerHelper("getNextCardTime", function () {
} else {
nextDate = moment(nextCardDate).locale("de");
}
if (nextDate.get('hour') >= Meteor.settings.public.leitner.dayIntervalHour) {
if (nextDate.get('hour') >= Meteor.settings.public.leitner.dailyCronjob.executeAtHour) {
nextDate.add(1, 'day');
}
nextDate.hour(Meteor.settings.public.leitner.dayIntervalHour);
nextDate.hour(Meteor.settings.public.leitner.dailyCronjob.executeAtHour);
nextDate.minute(0);
return TAPi18n.__('noCardsToLearn') + nextDate.format("D. MMMM") + TAPi18n.__('at') + nextDate.format("HH:mm") + TAPi18n.__('released');
});
......
......@@ -82,10 +82,10 @@ Template.cardsetNavigationLearning.onRendered(function () {
} else {
nextDate = moment(nextCardDate).locale("de");
}
if (nextDate.get('hour') >= Meteor.settings.public.leitner.dayIntervalHour) {
if (nextDate.get('hour') >= Meteor.settings.public.leitner.dailyCronjob.executeAtHour) {
nextDate.add(1, 'day');
}
nextDate.hour(Meteor.settings.public.leitner.dayIntervalHour);
nextDate.hour(Meteor.settings.public.leitner.dailyCronjob.executeAtHour);
nextDate.minute(0);
text += TAPi18n.__('noCardsToLearn') + nextDate.format("D. MMMM") + TAPi18n.__('at') + nextDate.format("HH:mm") + TAPi18n.__('released');
}
......
......@@ -10,7 +10,7 @@ export class CronScheduler {
SyncedCron.add({
name: "leitnerCron",
schedule: function (parser) {
return parser.recur().on(Meteor.settings.public.leitner.dayIntervalHour).hour();
return parser.recur().on(Meteor.settings.public.dailyCronjob.executeAtHour).hour();
//Use this line on a local server to trigger the cronjob every 30 seconds
//return parser.text('every 30 seconds');
},
......
......@@ -9,8 +9,8 @@
"popupWidth": 810,
"popupHeight": 610
},
"leitner": {
"dayIntervalHour": 8
"dailyCronjob": {
"executeAtHour": 8
},
"university": {
"singleUniversity": true,
......
......@@ -9,8 +9,8 @@
"popupWidth": 810,
"popupHeight": 610
},
"leitner": {
"dayIntervalHour": 8
"dailyCronjob": {
"executeAtHour": 8
},
"university": {
"singleUniversity": false,
......
......@@ -9,8 +9,8 @@
"popupWidth": 810,
"popupHeight": 610
},
"leitner": {
"dayIntervalHour": 8
"dailyCronjob": {
"executeAtHour": 8
},
"university": {
"singleUniversity": false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment