chore(deps): upgrade node-cron from v3 to v4 and update cron scheduling options
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user