await cron jobs to catch errors
This commit is contained in:
parent
b5b062f674
commit
9699d0f08f
|
@ -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}`);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user