Answer the question
In order to leave comments, you need to log in
Cron laravel, call, what's wrong?
I want to test cron in laravel.
There is the usual code in the schedule method:
$schedule->call(function () {
file_put_contents(public_path(). DIRECTORY_SEPARATOR. "test.txt", "\nSite". rand(0, 99999));
(new Site([
"name" => "TEST",
"url" => "http://test.ru",
"region_yandex_id" => "213",
"is_active" => true,
"frequency_of_removal" => "everyMinute"
]))->save();
})->everyMinute();
call
(purely in the schedule method), then everything works fine, but there are some problems inside. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question