Skip to content
Advertisement

Laravel Schedule 5.4 names like `everyMinute()` not working

I am using Laravel 5.4

When I use everyMinute() it always return an error

In FieldFactory.php line 46:

  5 is not a valid position

when I convert it to cron('* * * * *') then it is working.


Error:

protected function schedule(Schedule $schedule)
{
    $schedule->job(new TestJob())->everyMinute();
}

Working:

protected function schedule(Schedule $schedule)
{
    $schedule->job(new TestJob())->cron('* * * * *');
}

Advertisement

Answer

I managed to solve it via composer update. I think there’s a package that rely on Laravel 5.5 or higher. Because 5.5 only require ->cron('* * * * *') and Laravel 5.4 accepts ->cron('* * * * * *')

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement