Mailing List Archive


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

Re: [tlug] Efficiently executing a cron job on my webhosting server



Nguyen, Darren, Steven,

Thanks for responding.

Following the advice here, I've discovered that my server allows me to execute PHP from a command line, so I can execute scripts from cron by putting "php" before the name of my script.

Also, I've made the permissions to be 700, and that seems to work.

I have some follow up questions though.

The cron interface in my website control panel (cPanel) is set up to take an email address to receive any error output or notifications. This seems like a good thing, but I've learned that it sends me a message even when the PHP script runs successfully, which I don't really need to know all the time.

The message it sends me has this in the body:
X-Powered-By: PHP/5.1.4
Content-type: text/htm

I'd like for it to not send me anything except error notification. Is that possible?

Also, I think this may be related, I want to make sure the PHP script cleans up after itself and doesn't use up any memory or create any temp files that stick around after it's done. I have a vague notion that a PHP script might allocate resources when it runs, but I'm not totally sure if it always does no matter what.

How can I be sure that my PHP script won't eat up memory?

--
Dave M G

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links