mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
使用 spawn exit 方法监听进程退出
This commit is contained in:
@@ -23,7 +23,7 @@ export function runCron(cmd: string, options?: { schedule: string; extraSchedule
|
||||
);
|
||||
});
|
||||
|
||||
cp.on('close', async (code) => {
|
||||
cp.on('exit', async (code) => {
|
||||
resolve({ ...options, command: cmd, pid: cp.pid, code });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user