
Originally Posted by
logic_earth
Use file locking. If file B is locked it is running, when file B is done running it unlocks itself. That would the easiest way I could think of.
Okay, I'm not familiar with this at all, but I'll give it a shot.
Let me know how wrong I am here...
In script A, I would use something like:
PHP Code:
if (!(fopen("scriptB.php", "r"))) {
exec("scriptB.php");
}
And in the beginning of script B, I would have:
PHP Code:
flock(fopen("scriptB.php", "r"), LOCK_EX);
...I have no idea what I am doing.
Bookmarks