Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] Efficiently executing a cron job on my webhosting server
- Date: Fri, 6 Jul 2007 12:20:09 +0900
- From: "Dave Gutteridge" <ebisudave@example.com>
- Subject: [tlug] Efficiently executing a cron job on my webhosting server
TLUG,
After a little web research and experimentation, I've managed to execute a PHP script with a cron job on my webhosting server.
The command I use within the crontab is:
wget -O /dev/null http://mywebsite.org/test_cron.php
If I have it right, it accesses the PHP script, thus executing it, but moves any output to null, so as to not eat up memory. Eventually, I intend to use a cron job for PHP to check email from a POP3 server, so I hope this is a workable way of doing it.
I read that the command line web browser "lynx" might also be appropriate, but it doesn't seem to be available on my system. Also, I tried to simply access the PHP script directly (without wget), because some information I read said that it would be possible if "php was installed as a cgi". However, this doesn't seem to be true on my webhost (assuming I tried to access it in the right way).
I'm wondering two things.
One is, is this the most efficient way to call/execute the PHP script? I always thought that accessing a local file via http was more inefficient than accessing it through local directories. Maybe I'm wrong about that. Is there a better way?
The second is, the first time I ran the above command in cron, I got an error message (via my admin email) saying "permission denied". I changed the permissions to 777 just to get it working. But what is the most appropriate permission setting for a PHP script I'm intending to execute this way?
Thank you for any advice.
--
Dave M G
- Follow-Ups:
- Re: [tlug] Efficiently executing a cron job on my webhosting server
- From: Nguyen Vu Hung
- Re: [tlug] Efficiently executing a cron job on my webhosting server
- From: Darren Cook
Home | Main Index | Thread Index
- Prev by Date: [tlug] Re: [tlug-admin] [Announcement] TLUG Technical Meeting 2007-7-14
- Next by Date: Re: [tlug] [OT] Say _no_ to the Microsoft Office format as an ISO standard
- Previous by thread: [tlug] shameless plug...
- Next by thread: Re: [tlug] Efficiently executing a cron job on my webhosting server
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links