Skip to content

Commit a94f012

Browse files
committed
drop cron-parser for sanity check and use Croner constructor
1 parent af3a1f7 commit a94f012

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/Common.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,11 @@ Common.sink.determineCron = function(app) {
335335
}
336336

337337
if (app.cron_restart) {
338-
const cronParser = require('cron-parser')
338+
const Croner = require('croner');
339339

340340
try {
341341
Common.printOut(cst.PREFIX_MSG + 'cron restart at ' + app.cron_restart);
342-
cronParser.parseExpression(app.cron_restart);
342+
Croner(app.cron_restart);
343343
} catch(ex) {
344344
return new Error(`Cron pattern error: ${ex.message}`);
345345
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@
177177
"cli-tableau": "^2.0.0",
178178
"commander": "2.15.1",
179179
"croner": "~4.1.92",
180-
"cron-parser": "~3.5.0",
181180
"dayjs": "~1.8.25",
182181
"debug": "^4.3.1",
183182
"enquirer": "2.3.6",

0 commit comments

Comments
 (0)