Now i'm doing some project use laravel framework. do i able to run Symfony Process function inside a queue jobs?
use Symfony\Component\Process\Process;
use Symfony\Component\Process\Exception\ProcessFailedException;
right now i want to run some commend using Symfony Process function for this
process = new Process("facebook-scraper --filename public/data/nintendo.csv --pages 5 nintendo");
if outside the queue. this code can run succesful. but when i want to make it run inside the queue jobs. it can't.
how do i able to run symfony Process function inside queue on jobs laravel.
I think the problem is the paths. Replace the
--filename
option value with the absolute path (from /):...
And try to use full path to executable (
facebook-scraper
). You can usewhich
to find it.Example: