General discussions related to php
Moderators: macek, egami, gesf
Has anyone ever developed a PHP Script to run as a deamon? I have created an infinite while loop with a 1-2sec delay and placed it on the background on linux using php as CGI.
(#php -q script &). The consuming mem is too low ... about 0.3% of total so the script is not very heavy for the server.
I want to know if someone has a different idea on this or something better than that...
- New php-forum User
- Posts: 73
- Joined: Sun May 04, 2003 4:26 am
- Location: Athens
Seems like a reasonable idea to me, though I'd be a little concerned about performance. Just make sure you unset() your variables whenever you have the opportunity to do so. There's a decent (if old) article at PHPBuilder about Using PHP As a Shell Scripting Language
, which you might care to check out, but you might be way ahead of me.
- Posts: 2272
- Joined: Sat Jul 05, 2003 1:18 pm
- Location: A bunk in the back
Return to PHP General
Who is online
Users browsing this forum: No registered users and 1 guest