On your server make the corn job command runs every second. On your Laravel app make it runs every minute.
Jan 29, 2023
13
Level 1
Schedule command not work
Hello everyone, I have set a cronjob to run everyminute in the cpanel and also write a task to run every minute in the Console/Kernel.php as well.
$schedule->call(function(){
logger()->error('hello2');
})->everyMinute();
We have two hosts on a same server the code works correctly in the host1 but does not work in the host2.
the cron job is :
/usr/local/bin/ea-php74 /home/username/backend/artisan schedule:run >> /home/username/cronlog.txt
the log contains only "there are no scheduled command ready to run"
how can i fix this? I am usign laravel 8.* with php 7.4
"Note: I copied all the files and database from host1 on the new host but i try to change the apllication key too but all these did not help me"
Please or to participate in this conversation.