Does PHP script Stay alive after it is invoked using cURL? -
consider situation, have huge data process, want break parts, using cronjobs invoke script checks if new data processed available, if then, script invokes few other scripts using curl, question is,
the script might take couple of minutes execute, hence if invoking parent dies after assigning jobs individual scripts before individual scripts, indiviual scripts die ?,
all have invoke script pass key script request , output of script stored in database itself.
ps: script refers php script.
you can run command in background without waiting response using "&" command
for example suppose want run job.php index.php without waiting response. in index.php instead writing
shell_exec('php job.php');
i
shell_exec('php job.php > /dev/null 2>/dev/null &');
and puts command in background , free terminal immediately.
Comments
Post a Comment