Hi,
I have a script (doStuff.php), I want to run it directly on the server in the background and the output of that script is to be sent to a text file called output.txt. This is what i am doing but doesnt seem to be working.
set_time_limit(0);
$cmd = 'nohup /usr/local/bin/php -f /home/bancadmin/adminNew/doStuff.php >/home/bancadmin/adminNew/output.txt 2>&1 &';
exec($cmd);
header('Location: system_console.php');
Can someone suggest something.