Per Jessen wrote:
Luca Paolella wrote:
I want the bot to run a process in background (a periodic message,
for example) while listening for events (like a user joining a
channel or using a certain command) and consequentially executing the
corresponding functions, is it possible? and how?
Write a PHP CLI script, then append '&' to detach when you start it.
/Per Jessen, Zürich
This method will work until you log out, when you log out all your background processes are killed.
If it were to be a CLI and you wanted it to run constantly and you manually wanted to control it, I
would use "screen". Screen allows you to start a new terminal, start something, and then "detach"
from that screen. Then you are allowed to log out and the next time you log in, you are able to
resume the previous terminal session.
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php