Re: Can I make a process run in background?
| From: | Jim Lucas | Date: | Tue, 06 Nov 2007 15:38:02 +0000 |
| Subject: | Re: Can I make a process run in background? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-264113@lists.php.net to get a copy of this message | ||
Per Jessen wrote:
Luca Paolella wrote: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 ShakespeareI 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.