View Full Version : Sending commands to an executing script

11-11-2005, 03:58 AM
Is it possible to send commands directly to an executing PHP script without having to go through an intermediary? By intermediary I mean such as using a file that is read on every run of a loop to see if it contains a message or by checking a database value.

I have a number of scripts which need to run for 48 hours or more on a periodic basis but use up almost all CPU power. If the computer in question needs to be utilized then I would like to be able to pause the script without having it completely stop, basically by just using the sleep() function over and over while having it wait for a continuation signal. However, I would like to eliminate the current method I am using which is to check a file for a message telling it when to stop and start.

I was hoping that perhaps there would be a way to alter the contents of a variable's value stored in memory using another PHP script.

11-11-2005, 09:54 PM
you know I was about to say, how about a file that tells it when to stop and start... <grin>
or you could do this via the database, just turn the status on and off...