Skip to content

Mixed expressions are treated as invalid. #2

@milinsoft

Description

@milinsoft

Hi,

I tested library on the examples provided by official Quartz Scheduler documentation. and found bug.

The following line 0/5 14,18,3-39,52 * ? JAN,MAR,SEP MON-FRI 2002-2010 does not pass validation, as it contains mix of sequence and interval its minutes section.

Such mixes can occur in other fields sections as well.

I see two the most strait-forward solutions:

  1. Split such parts into subparts and validate using existing regexes.
  2. (more optimal), Update existing regexes allowing such mixes

example:

from quartz_cron_checker import validate_cron_string, QuartzCronChecker
c = QuartzCronChecker.from_cron_string("0/5 14,18,3-39,52 * ? JAN,MAR,SEP MON-FRI 2002-2010")
c.validate()
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions