You are here: Re: Automated Script « PHP Programming Language « IT news, forums, messages
Re: Automated Script

Posted by Andrew @ Rockface on 11/24/14 11:28

Adam wrote:
> On Tue, 4 Oct 2005 07:50:59 +0000 (UTC), Andrew @ Rockface wrote:
>
>
>>chotiwallah wrote:
>
>
>>You could use an infinite loop and stick the code to be executed inside
>>with a sleep at the end.
>>
>>$x = 5;
>>while(1) {
>> echo "Hello world";
>> sleep($x);
>>}
>
>
> I've been digging around looking for info on precisely this topic.
>
> Not sure whether your code will work (infinitely). It will simply hit
> the maximum page execution time set by php.ini on the server - then
> throw an ugly error.
>
> You could extend that time with ini_set() - but I'm not sure whether
> there's a memory or performance hit on a server processing an infinite
> loop. It would also dependon what is actually happeniong iside the
> loop.

True.

I generally run php scripts using wget from a crontab job. In fact I do
that every hour to run remote tests on around 60 sites and have found
it's perfect for the job.

--
Andrew @ Rockface
np: (Winamp is not active ;-)
www.rockface-records.co.uk

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация