auto init of special notes after startup

This commit is contained in:
zadam
2021-09-16 22:20:59 +02:00
parent 06bcfe1aee
commit 5866004e23
2 changed files with 25 additions and 15 deletions

View File

@@ -5,6 +5,7 @@ const config = require('./config');
const log = require('./log');
const sql = require("./sql");
const becca = require("../becca/becca");
const specialNotesService = require("../services/special_notes");
function getRunAtHours(note) {
try {
@@ -55,5 +56,7 @@ sqlInit.dbReady.then(() => {
setInterval(cls.wrap(() => runNotesWithLabel('hourly')), 3600 * 1000);
setInterval(cls.wrap(() => runNotesWithLabel('daily')), 24 * 3600 * 1000);
setTimeout(cls.wrap(() => specialNotesService.createMissingSpecialNotes()), 10 * 1000);
}
});