Multithreading with PHP is not really possible. I've read that the only way to accomplish it is to have one php script run several shell commands, calling each of the other scripts in the background, but people have had problems with this as well...
In order to create a script to do what you're describing, it seems like the script will need to be running all the time and be set to sleep when it's not running anything. The simplest way to do this would be to set it up so that when it completes a task, it calculates the number of seconds until the next task, and goes to sleep for that many seconds. However, if that method is used and the server is reset or something... then you're out of luck. The only way I know of doing that reliably is to set up the cron (I'm not sure how in windows) to run php scripts at the times you need them to run.
Sorry if I wasn't helpful :/
-Steve
"Build a man a fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life."
Bookmarks