Hi friends,
Is there any way to check in PHP if a script is still running or it has stopped execution.
I have a system which handles files in such a way that it moves files into different directories depending on some rules. Each file takes atleast 4 to 5 seconds to get processed(XML files).
The problem what i am facing is .. i want only one user to acess the system at once. i,e if the script is already running (takes 2 to 30 minutes depending on total files) .. i do not want some one else to execute the script. When script is exucuted again(when the first instance is still running) .. i should be able to detect it and throw a message at user saying "the script is being executed .. please try after some time".(because a second(or more) instance creates a mess)
I thought i'll build a login/logout interface .... but that did not work out for the above problem ....
Any suggestions / solutions ..
Thanks in Advance ..
Danny Appaiah