Remember to 

<?php
set_time_limit(0);
?>
http://us4.php.net/manual/en/function.set-time-limit.php

That will allow your PHP program to run infinitely long -- and not time
out after x seconds.

-Dan

On Mon, 2003-07-07 at 09:08, Uros wrote:
> Hello,
> 
> Ok let be more specific about my idea. Because I'm better php programer
> than C I decided to write this in php. I use comandline php.
> 
> I want to write some daemon to be started
> 
> ./myprog &
> 
> Than this has to be run until I cancel it. But I also want to check
> somehow, what this proces is doing right now.
> 
> for example like in apache.
> 
> you start it with apachectl start. than you can say apachectl restart to
> reread config. And for example you could use apachectl status to output
> some info about runing server.
> 
> 
> This program I'll make will be run in infinite loop. It will be reading
> some file on disk and doing something with this data.
> 
> Do I have to use any usleep function. What is with CPU % when i run such
> script.
> 
> Is there any real examples. I read on devshed article about TCP socket
> listenig, but I don't like this.
> 
> tia
> 
> Uros
> 
> Monday, July 7, 2003, 2:58:52 PM, you wrote:
> 
> 
> >> Can somebody give me any workable example how to run some script written in
> >> PHP in Unix console.
> 
> GD> #!/usr/local/bin/php -q
> GD> <?php
> GD> echo "Example script";
> ?>>
> 
> >> I wan't to write some server aplication. So it has to be run in the
> >> backgroud.
> 
> GD> Have a look at the process control functions:
> GD> http://php.net/pcntl
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to