Re: how to run 'periodic'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you Joe for your input. I will take a look at crond.

/frank
7 apr 2006 kl. 20.06 skrev Joe Wollard:

Frank,

It sounds like you need to run this as a job through crond. I'm not sure what the OSX version is (maybe they have a port of crond?) but you could set that up to execute the specific code, as root, whenever you want. As far as I can think, and maybe Chris Shifflet can confirm/deny this, you shouldn't be running into any additional security issues by executing the script as root - As long as it's running through the CLI version of PHP. Just make
sure it's only executable by root and then root should be the only one
allowed to create that mammoth ;-)

- Joe

On 4/6/06, Frank Arensmeier <frank.arensmeier@xxxxxxxxxxxxxxxxx> wrote:

Hi.

I have written a script which outputs a rather large ZIP file ( 200
MB ) by collecting a large amount of PDF files and html pages. When
the script is done, the available amount of free memory has decreased
by about 20 - 30%. Running 'periodic' on my machine ( Apple Xserve G5
with Mac OS 10.4 server) restores the available memory to a more
proper size.

The question is: how can I execute 'periodic daily|weekly|monthly'
from my script? Is this possible at all? I know that 'periodic' needs
root. And all PHP code is executed as www user which doesn't have
root privileges. Would I compromise my servers security when granting
root privileges to a script that executes 'periodic' (which could be
called from the script that outputs the ZIP archive)?

thanks
/frank

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



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux