small bugfix, adding catch for main run

main
HerrHase 7 months ago
parent 814bd42b65
commit b78fd0f4f4

@ -23,7 +23,7 @@ if (configs.length === 0) {
}
// running through configs
for (const config in configs)
for (const config in configs) {
// check for cron
if (!config.hasOwnProperty('cron')) {
@ -35,6 +35,10 @@ for (const config in configs)
*
*/
const task = cron.schedule(config.cron, async() => {
const docket = await run(config, docket)
try {
const docket = await run(config, docket)
} catch(error) {
logger(config.slug).error(error)
}
})
}

@ -32,4 +32,9 @@ if (configs.length === 0) {
}
const config = configs[0]
const docket = await run(config)
try {
const docket = await run(config)
} catch(error) {
logger(config.slug).error(error)
}

Loading…
Cancel
Save