Code Monkey home page Code Monkey logo

crony's People

Contributors

emmanueltouzery avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

sof123 kouzouigh

crony's Issues

Validation Error: "Invalid month: 0"

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]

Add quickcheck tests

Many things in crony should quickcheck well. Try adding some quickcheck validations leveraging javaslang support.

support names for months & days of week

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.

match decision: it's not a simple "and" on all the cron fields

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"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.