PHP Exec PHP script from command line on Windows in the background

tytyloz

New Member
I have a PHP page that I am executing from another PHP page like this - \[code\]exec('c:\php\php.exe processing.php > NUL ');\[/code\]The processing page has a SQL stored procedure that runs and takes awhile to complete after the stored procedure is complete the page then creates a .csv from the results and drops it into a directory. This entire process works fine as long as it does not take too long to execute. If I am running it on a few thousand records it only takes like 3-5 minutes and completes fine. If I run it with like 20K records the process takes over 10 minutes to complete but is getting killed before it's done.The speed is not the issue, we are fine with it taking awhile to run but somehow the script is getting killed. While it's running I can see the CLI process from the task manager in Windows but it seems like if it takes more than 10 minutes Windows is killing it or something.I am just trying to figure out how I can run this without the process getting killed for taking too long.Any help on this would be greatly appreciated.Thanks!
 
Back
Top