await cron jobs to catch errors

This commit is contained in:
HF 2022-08-21 20:34:23 +02:00
parent b5b062f674
commit 9699d0f08f

View File

@ -40,7 +40,7 @@ class Cron {
this.lastRun = curTime;
this.functions.forEach(async (item) => {
try {
item();
await item();
} catch (err) {
logger.error(`Error on cron job: ${err.message}`);
}