mirror of
https://github.com/whyour/qinglong.git
synced 2026-10-01 05:13:50 +08:00
refactor: migrate cron scheduling to node-cron (#3079)
* refactor: migrate cron scheduling to node-cron * feat: support annually midnight and minutely cron macros * fix: harden cron recovery and system scheduler compatibility
This commit is contained in:
@@ -41,8 +41,10 @@ test('recovery reconciles a surviving scheduler after missed deletes and disable
|
||||
);
|
||||
const { addCron } = load('back/schedule/addCron.ts', {
|
||||
'./data': { scheduleStacks: stacks },
|
||||
'node-schedule': {
|
||||
scheduleJob: (id) => ({ cancel: () => cancelled.push(id) }),
|
||||
'../shared/cronScheduler': {
|
||||
createCronJob: (_schedule, _callback, options) => ({
|
||||
start() {}, cancel: () => cancelled.push(options.name.split(':')[0]),
|
||||
}),
|
||||
},
|
||||
'../shared/runCron': {},
|
||||
'../loaders/logger': { info() {}, warn() {} },
|
||||
|
||||
Reference in New Issue
Block a user