emmanueltouzery / crony Goto Github PK
View Code? Open in Web Editor NEWA java library to work with cron specifications
License: MIT License
A java library to work with cron specifications
License: MIT License
Hello,
I try to parse string "0 9 * */3 1" or "0 9 * */4 1". It is a valid cron expression. But when i try
Validation<String, Cron> validation = Cron.parseCronString(0 9 * */3 1); validation.get();
i get the result
java.util.NoSuchElementException: get of 'invalid' Validation at io.vavr.control.Validation$Invalid.get(Validation.java:724) ~[vavr-0.9.0.jar:na]
Many things in crony should quickcheck well. Try adding some quickcheck validations leveraging javaslang support.
if you give to gapToClosestExecution
the exact execution date time, it will not take it into account and will give you the previous or next closer match. This is a bug, must fix and release 1.0.1.
man 5 crontab states:
Names can also be used for the 'month' and 'day of week' fields. Use the first three letters of the particular day or month (case does not matter). Ranges or lists of names are not allowed.
https://en.wikipedia.org/wiki/Cron#Overview
"While normally the job is executed when the time/date specification fields all match the current time and date, there is one exception: if both "day of month" (field 3) and "day of week" (field 5) are restricted (not "*"), then one or both must match the current day."
http://pubs.opengroup.org/onlinepubs/007904975/utilities/crontab.html
"if either the month or day of month is specified as an element or list, and the day of week is also specified as an element or list, then any day matching either the month and day of month, or the day of week, shall be matched."
also in "man 5 crontab"
"Commands are executed by cron(8) when the 'minute', 'hour', and 'month of the year' fields match the current time, and at least one of the two 'day' fields ('day of month', or 'day of week') match the current time"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.