mirror of
https://github.com/Unitech/pm2.git
synced 2026-02-01 16:57:09 +00:00
(cron) emit disconnect and wait for nextTick to exit
This commit is contained in:
parent
aaa32e0e2b
commit
8c965ec678
@ -94,7 +94,10 @@ function cronize(cron_pattern) {
|
||||
var job = new cronJob({
|
||||
cronTime: cron_pattern,
|
||||
onTick: function() {
|
||||
process.exit(0);
|
||||
process.emit('disconnect');
|
||||
process.nextTick(function() {
|
||||
process.exit(0);
|
||||
});
|
||||
},
|
||||
start: false
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user