[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] setting up a cronjob for running a php file
- Subject: Re: [cobalt-users] setting up a cronjob for running a php file
- From: "Steve Werby" <steve-lists@xxxxxxxxxxxx>
- Date: Thu Feb 14 20:00:00 2002
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
I normally don't do this, but to save the list from 2 emails, I'm replying
to the posts from Brett and Mark in a single email.
"Brett Wright" <brett@xxxxxxxxxxxxx> wrote:
> 0,5,10,15,20,25,30,35,40,45,50,55 * * * lynx -source
> http://www.domain.com/web/netstatus/cron_script/cron_script.php>/dev/null
That will work.
"Mark S Burgunder" <maillist@xxxxxxxxxx> wrote:
> "wget http://www.domain.com/netstatus/cron_script/cron_script.php
> >/dev/null"
That will also work. However, both solutions rely on the http protocol
(webserver) to run the script. Since Robbert said the script is designed to
monitor services running on the server it doesn't seem appropriate to rely
on one of those services to be running and accessible in order to do the
monitoring. If the webserver's down cron won't be able to run the
monitoring tool. There are some other downsides to having automated non-CGI
PHP scripts available via the web. Unless they're password-protected or
access is limited in some way anyone can run them, they use bandwidth, they
generate records in your web log which you may not want and they can only be
run with the same privileges as the user Apache runs as. By installing PHP
as a CGI (this is the default installation of PHP) all of these concerns are
eliminated. Of course, in many cases these might not be issues (especially
if the script is on a different server) and some, like password-protection
and access control can be controlled by a .htaccess file (wget and lynx can
be passed parameters to supply the http user/password), but I thought
Robbert and/or some others might not be aware of these issues and the
solution I described.
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/