parse-cron
parse-cron copied to clipboard
parses cron expressions and calculates the next occurence after a given date
- e.g. "0 0 \* \* 2#3 *" means the 3rd Monday in the month Signed-off-by: Eric Wang [email protected]
This PR adds strict matching to cron parsing. I find the default matching behavior when both DOW and DOM are specified to be unexpected. It inhibits a number of use...
There is a bad calculation if I set more complex crontab. Here is an example. 2.2.4 :001 > require 'cron_parser' => true 2.2.4 :002 > require 'time' => true 2.2.4...
Previously parse_element worked with both */int and int-int/int step formats, but would throw an error when doing int/int (e.g. 1/5). I've added a spec that covers this and a fix...
Hi, CronParser#next is failing with some expressions. One example: expression = "15-59/15 \* \* \* *" cron_parser = CronParser.new(expression) next_execution_time = cron_parser.next(Time.now) Trace: ArgumentError: argument out of range from /usr/lib/ruby/gems/1.9.1/gems/parse-cron-0.1.2/lib/cron_parser.rb:22:in...
I think following is a valid cron expression: "50 21 ? \* 3,6" But cron-parser throws exception for it. At the same time 50 21 \* \* 3,6 is invalid,...