We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
错误复现
let parser = require('cron-parser'); let interval = parser.parseExpression('* * * */7 * *'); var fields = JSON.parse(JSON.stringify(interval.fields)); fields.dayOfMonth = [1,8,15,22,29]; var modifiedInterval = parser.fieldsToExpression(fields,true); var cronString = modifiedInterval.stringify(true); console.log(cronString); //输出结果 "* * * 1-29/7 * *" //应当输出的结果 * * * */7 * *
通过查看源码发现 field_stringify.js ** 第13-15行**
//这行判断导致无法正确解析 if (step !== 1 && singleRange.start === min && singleRange.end === max - step + 1) { return '*/' + step; }
修改代码如下:
//修改之后即可正确解析 * * * */7 * * if (step !== 1 && singleRange.start === min && singleRange.end + step > max) { return '*/' + step; }
希望作者大大处理一下, 感谢!!!
The text was updated successfully, but these errors were encountered:
@martian98 thanks for reporting this. Probably also related to the suggestion provided here: #222 -- I'll investigate this when I've a bit more time.
Sorry, something went wrong.
No branches or pull requests
错误复现
通过查看源码发现 field_stringify.js ** 第13-15行**
修改代码如下:
希望作者大大处理一下, 感谢!!!
The text was updated successfully, but these errors were encountered: