peppeocchi / php-cron-scheduler

PHP cron job scheduler
MIT License
811 stars 144 forks source link

PHP Parse error: Invalid numeric literal #102

Closed sitenzo closed 4 years ago

sitenzo commented 4 years ago

Hello @peppeocchi

I'm setting my daily schedules like ->daily(22,06); But when i do this for minute 08 and 09 i get a parse error. When i parse a string like ->daily('22:08'); it works fine.

The error also happens when i test is with the montly function.

i am on live PHP version 7.1.33 i am on test PHP version 7.3 And using php-cron-scheduler version : 3.*

peppeocchi commented 4 years ago

@sitenzo that seems to be a php error rather than a scheduler error. https://stackoverflow.com/questions/40735963/parse-error-invalid-numeric-literal

Just pass it as a string or as a number without the leading 0

->daily(22, 8);
->daily(22, '08');