I have a cron job with Laravel:
public function handle(){
$reimport = $this->argument('reimport');
$lib = new CustomLibrary();
$lib->importAll();
}
I am calling this in my controller:
Artisan::call('my_command');
or in SSH
:
php artisan my_command
Te problem is that in both places the job is not in a background, because it takes more than minute to finish.
Is there way to make that job to run in a background in the controller and in SSH
(optional) ?