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]Re: [tlug] Efficiently executing a cron job on my webhosting server
- Date: Fri, 6 Jul 2007 12:57:42 +0900
- From: "Nguyen Vu Hung" <vuhung16plus@example.com>
- Subject: Re: [tlug] Efficiently executing a cron job on my webhosting server
- References: <7d27112b0707052020h293cbf71se22c91761135d686@mail.gmail.com>
On 7/6/07, Dave Gutteridge <ebisudave@example.com> wrote:TLUG,
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?
# you can install lynx if gcc is available there.
Local call is better than excuting wget IMO.
If you make test_cmd.php like:
#!/path/to/php
# insert your PHP code here
and put test_cmd.php in your contab -e, you will not have to call wget.
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?I don't know how your web server is configurated but
chmod o+r file.php
just works in most cases.
The reason is that file.php is owned by you, while when you wget it, the web server run it under the owner of the web server.
-- Best Regards, Nguyen Hung Vu vuhung16plus{remove}@example.com An inquisitive look at Harajuku http://www.flickr.com/photos/vuhung/sets/72157600109218238/
- References:
- [tlug] Efficiently executing a cron job on my webhosting server
- From: Dave Gutteridge
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] [OT] Say _no_ to the Microsoft Office format as an ISO standard
- Next by Date: Re: [tlug] [OT] Say _no_ to the Microsoft Office format as an ISO standard
- Previous by thread: [tlug] Efficiently executing a cron job on my webhosting server
- 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