Khaled_Saiful_Islam
Khaled_Saiful_Islam

Reputation: 150

In Laravel Scheduler function, everyMinute() does not work

I'm using Laravel 5. In my Schedule method (in kernel.php), i used everyMinute function. Please take a look:

enter image description here

But its not working. It shows message "Call to undefined method". Please take a look:

enter image description here

I need to call scheduler every minute via call function. Please help me.

Upvotes: 2

Views: 4076

Answers (2)

Saiyan Prince
Saiyan Prince

Reputation: 4020

Well, Laravel is clearly saying you that there is no method defined as everyMinute in Schedule. Forget about the official documentation, it is not there in the API Documentation as well as Laravel 5.0.*.

If you really want that to run every minute, you can upgrade your app to Laravel 5.1.* or greater.

Upvotes: 1

lagbox
lagbox

Reputation: 50491

It doesn't appear to have that method in 5.0.

Use the manual cron expression for every minute.

$schedule->call(...)->cron('* * * * * *');

Upvotes: 3

Related Questions