Re: how to run 'periodic'
| From: | Frank Arensmeier | Date: | Sun, 09 Apr 2006 20:35:55 +0000 |
| Subject: | Re: how to run 'periodic' | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-233637@lists.php.net to get a copy of this message | ||
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@nikehydraulics.se> 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