I wanted to know how to run python script using php code. I have tried different options like
$output = exec(\"python /var/GAAutomationScript.py\");
$com
Some things to mention about your question :
www-data
and your python script is lets say ubuntu.nbody
for example, it will then check what permissions the python script has. Are users other than ubuntu
in this example are allowed to run it. symfony/process
. Then run it and debug the errors. once it works then you can add that as in laravel's cron jon.See this to know mo about scheduling artisan commands.
You can also avoid creating artisan command and add shell directly, as it internally uses symfony/process
. See this for that reference