Search code examples
phplaravellaravel-5.3

why isn't "between" available in a laravel schedule task?


I've got the manual in front of me, I've searched Google, and nothing. Why is this:

//update combined results cache
        $schedule->call('App\Http\Controllers\CombinedYieldUpdater@index')
            ->everyFiveMinutes()
            ->between('02:00', '04:00');

causing this?

[2017-01-09 11:42:02] local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\Console\Scheduling\CallbackEvent::between()

Solution

  • It looks like you don't use Laravel 5.3. Similar problem here where user wanted to use method available in Laravel 5.2. and he was using 5.1.

    Are you sure you using 5.3? If not update your framework to 5.3 and it should work.