chore(deps): upgrade node-cron from v3 to v4 and update cron scheduling options

This commit is contained in:
2026-04-22 17:18:24 -04:00
parent 9bb1b398c7
commit 794e0866ec
3 changed files with 10 additions and 22 deletions
+5 -5
View File
@@ -81,11 +81,11 @@ export function schedule(name, cronSchedule, handler, options = {}) {
} catch (error) {
fail(`Cron ${name}: ${error.message}`);
}
}, {
scheduled: true,
timezone,
runOnInit: options.runOnInit ?? false
});
}, { timezone });
if (options.runOnInit) {
handler().catch((error) => fail(`Cron ${name}: ${error.message}`));
}
jobs.set(name, {
job,