I used cron job to do some CRUD operation using laravel Task Scheduling. On localhost it is working fine. But on my shared host I keep getting this error.
2020-04-08 16:56:01] local.ERROR: The Process class relies on proc_open, which is not available on your PHP installation. {"exception":"[object] (Symfony\\Component\\Process\\Exception\\LogicException(code: 0): The Process class relies on proc_open, which is not available on your PHP installation. at /home/deshiit/public_html/bangladesh-railway-server/vendor/symfony/process/Process.php:143)
[stacktrace]
But on localhost it works fine. I contacted my hosting company to remove proc_open form disable PHP functions, but they can't. I tried the solution given here. But this solution is not working.
My PHP version is ea-php73
. I also tried ea-php71
and ea-php72
.
In
app/Console/Kernel.php
if I add
->withoutOverlapping();
after my command,
protected function schedule(Schedule $schedule)
{
Log::info('Cron Job Started 1.1');
$schedule->command('outlier:data')
->everyMinute()
->withoutOverlapping();
}
then proc_open error gives only for one time and then
protected function schedule(Schedule $schedule)
is getting called every minute but it is not executing the handle() funtion
public function handle()
{
Log::info('Cron Job Started 2.1 in Commands/FindOutlier.php');
}
But if I Clear Cache
, again it gives the proc_open error for one time and then call the schedule funtion every minute.