A
A
Alexander Koregin2020-05-01 11:50:45
Laravel
Alexander Koregin, 2020-05-01 11:50:45

How to run a function every minute in Laravel?

You need to run the function of checking MAC addresses every minute, I wrote a function in Kernel

protected function schedule(Schedule $schedule) {
        $schedule->call(function () {
            $controller = new AdminController();
            $controller->updateStatus();
        })->everyMinute();
    }


I run the command

php artisan schedule:run

And an error appears

5eabe2d23e62b984917827.png

Tell me what I'm doing wrong

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question