dragonmantank / cron-expression

CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due
MIT License
4.57k stars 124 forks source link

Unable to validate a cron expression for some case #110

Closed Akashgkv closed 2 years ago

Akashgkv commented 3 years ago

I use this cron expression 0 0 1 1/1 * it's a correct cron expression but it throws invalid. can you help me

Akashgkv commented 3 years ago

In a cron expression with / character is not taken has a valid expression

dragonmantank commented 2 years ago

You cannot have a range of a single value with a step. 1/1 is invalid as it semantically does not make sense as it translates to A range of 1-1, step 1 ... you would just want a simple 1 for the value, or * if you intend for it to run all the time.