mtdowling / cron-expression

CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due
http://mtdowling.com/blog/2012/06/03/cron-expressions-in-php/
MIT License
4.9k stars 335 forks source link

Invalid CRON field value 30 at position 1 #184

Closed goodjobs-ta closed 1 year ago

goodjobs-ta commented 1 year ago

Hi there,

I stumbled about a problem when I tried to set up a cron job with the following cron expression in Laravel 9:

30 0 *

This leads to:

Invalid CRON field value 30 at position 1 at /home/...../vendor/dragonmantank/cron-expression/ src/Cron/CronExpression.php:231

Strange to me, as the position of the value 30 should be position 0?

And the expression should be valid.

This expression seems to work:

5 0 *

Any idea what is going wrong here?

TIA and best regards!

goodjobs-ta commented 1 year ago

Seem like I got smething wrong :-(