w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Shell: Run PHP script and wait for it to finish

what if the script dies and fails to return a "done" message?

what if the script returns an error?

There are any number of situations where this is probably not the optimal way to deal with your problem.

You may be better off writing a process ID file (PID) when the script starts running. using getmypid()

The when it is time to execute it again, check the PID file, if it is stale and the process has finished then run again, else exit without running as the old process is still active.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.