RE: Need to Run a PHP script using CRON or ?

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

 



I believe this would need php to installed as a cgi, which I prefer not
to do...


On Mon, 2003-09-15 at 15:31, Ryan Marks wrote:
> Not necessarily.  You can wget /path/to/file.php or my personal preference
> is not to use wget, but php directly
> /path/to/php/executable /path/to/file.php
> 
> Just a thought,
> Ryan
> 
> -----Original Message-----
> From: Jonathan Villa [mailto:jvilla@isdesigndev.com]
> Sent: Monday, September 15, 2003 3:28 PM
> To: php-db@lists.php.net
> Subject: Re:  Need to Run a PHP script using CRON or ?
> 
> 
> 
> Interesting... how does this fair concerning security?  So I'll have to
> have this file located in my document root, is this a good thing?  My
> current directory structure consists of several files located outside
> the doc root.  I guess I could always include it onto a page
> 
> 
> On Mon, 2003-09-15 at 14:49, CPT John W. Holmes wrote:
> > From: "Jonathan Villa" <jvilla@isdesigndev.com>
> >
> >
> > > I have an application which creates temporary tables.  My plan is to
> > > remove them after a 24 hour period and only those which are have a
> > > created time greater than 24 hours.  That part I can do, my question is
> > > how will I be able to run this script which is a 2 part script.
> > >
> > > First thing I do is pull the names of the temporary tables which are
> > > going to be deleted from another table.  From this result set, I need to
> > > DROP tables as well as remove the reference to them from the first
> > > table.
> > >
> > > I understand that I can run PHP from the command line but this would
> > > require PHP to installed as a CGI which I prefer not to do.
> > >
> > > I was hoping I that I could use CRON to run this script once a day...
> >
> > You can. Create a php script that does what you want. It should not create
> > any output, either log status/error messages or send an email.
> >
> > If you save it as cron.php, you can use a command such as the following in
> > your crontab:
> >
> > wget -q -O - www.domain.com/cron.php > /dev/null
> >
> > I'm assuming you know the specifics of cron or can google for it. :)
> >
> > ---John Holmes...
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux