Commit b4c75037 authored by Curtis Adam's avatar Curtis Adam

Expoe an interval server setting for the leitner cron

parent bd30baa3
import {Meteor} from "meteor/meteor";
import {SyncedCron} from "meteor/percolate:synced-cron";
/**
......@@ -9,7 +10,7 @@ export class CronScheduler {
SyncedCron.add({
name: "leitnerCron",
schedule: function (parser) {
return parser.recur().on('01:00:00').time();
return parser.recur().on(Meteor.settings.public.leitner.dayIntervalHour).hour();
},
job: function () {
Meteor.call("updateLeitnerCards");
......
......@@ -13,6 +13,9 @@
"displayGoogle": true,
"displayCas": true
},
"leitner": {
"dayIntervalHour": 1
},
"university": {
"singleUniversity": true,
"default": "THM"
......
......@@ -14,6 +14,9 @@
"displayCas": true,
"displayTestingBackdoor": true
},
"leitner": {
"dayIntervalHour": 1
},
"university": {
"singleUniversity": false,
"default": "THM"
......
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