Skip to content

Commit

Permalink
drop cron-parser for sanity check and use Croner constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech committed Feb 15, 2022
1 parent af3a1f7 commit a94f012
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Common.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,11 @@ Common.sink.determineCron = function(app) {
}

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

try {
Common.printOut(cst.PREFIX_MSG + 'cron restart at ' + app.cron_restart);
cronParser.parseExpression(app.cron_restart);
Croner(app.cron_restart);
} catch(ex) {
return new Error(`Cron pattern error: ${ex.message}`);
}
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@
"cli-tableau": "^2.0.0",
"commander": "2.15.1",
"croner": "~4.1.92",
"cron-parser": "~3.5.0",
"dayjs": "~1.8.25",
"debug": "^4.3.1",
"enquirer": "2.3.6",
Expand Down

0 comments on commit a94f012

Please sign in to comment.