Comments (3)
To begin with, I would like to say that this is a great package, because I can't find any other nlp cron expression generator out there on npm that is as smart as this package.
However, one small downside is that the cron expressions generated somehow get flagged by crontab as a different meaning from what they should be.
After doing a quick search on google, there are a few crontab checkers to check if the cron expression is what you want it to be:
https://www.freeformatter.com/cron-expression-generator-quartz.html
https://cronexpressiondescriptor.azurewebsites.net/
As I mentioned earlier, when I try to do a cron expression for 'every hour between 5pm and 8pm' gives
* 17-20 * * ? *
which is not the correct expression.
The correct cron expression for that should be 0 0 * 17-20 * ? *
from natural-cron.js.
Which format do you have for cron-expressions?
from natural-cron.js.
Hi @joshuaquek Thanks a lot, it feels great to know that you liked the package.
Regarding the issue,
The format you described (0 0 * 17-20 * ? *
) contains 7 fields which means the first one is the seconds
field. Right now this package doesn't have support for seconds
field. So the generated expression has only 6 fields.
-
Still your reported issue is correct and for every hour, the minutes field should be
0
instead of*
.
(We will resolve this issue in next update as early as possible) -
We will definitely add support for
seconds
field soon when we get time.
Also it looks like your required expression has some fields shuffled as compared to the default generated expression from this package. But you can easily change the generated cron expression format as per your need with optional second argument to the function call. Check out Flexible outputs section in README.
from natural-cron.js.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from natural-cron.js.