-
Hello, quick question: why does Laravel throw an error if I try to set a cron like Laravel gives me this error:
This is the code inside Schedule::command(CoolCommand::class)
->cron('5/15 * * * *'); |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
laravel's cron expression parser is very basic. I think it might not accept this syntax. try this instead: Schedule::command(CoolCommand::class)->cron('5,20,35,50 * * * *'); |
Beta Was this translation helpful? Give feedback.
-
Did some more digging. The https://crontab.guru/#5/15__** crontab guru page says it is a non standard format. The following is according to standards, according to https://crontab.guru/#5-59/15__** Schedule::command(CoolCommand::class)->cron('5-59/15 * * * *'); So, whenever crontab guru says it is non standard, don't assume it works with Laravel, or anything else really. for more information also see https://github.com/dragonmantank/cron-expression |
Beta Was this translation helpful? Give feedback.
laravel's cron expression parser is very basic. I think it might not accept this syntax.
try this instead: