Coder Social home page Coder Social logo

nbari / cron-parser Goto Github PK

View Code? Open in Web Editor NEW
20.0 2.0 3.0 82 KB

cron parser

Home Page: https://docs.rs/cron-parser/latest/cron_parser/

License: BSD 3-Clause "New" or "Revised" License

Rust 100.00%
cron-parser cron cron-expression parser crontab crontab-expressions cron-format

cron-parser's Introduction

Hi there ๐Ÿ‘‹

  • ๐ŸŒฑ Rust
  • ๐Ÿ˜ FreeBSD
  • ๐Ÿฆญ ๐Ÿ˜ DBRE
  • ๐Ÿšฒ make it work, ๐Ÿš— make it better, โœˆ๏ธ make it fast

cron-parser's People

Contributors

nbari avatar tyrylu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cron-parser's Issues

Program panicked when number of fields less than 5

I got error when i parse wrong cron expression: * * * *

index out of bounds: the len is 4 but the index is 4

And i found this line try to get field by index 4:

let do_w = parse_field(fields[4], 0, 6)?;

Then i found these line checked if number of fields greater than 5, will throw a error:

cron-parser/src/lib.rs

Lines 123 to 125 in 37500d2

if fields.len() > 5 {
return Err(ParseError::InvalidCron);
}

Should we throw a error if number of fields less than 4? Like this:

if fields.len() != 5 {
    return Err(ParseError::InvalidCron);
}

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.