[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] PHP and crontab
- Subject: Re: [cobalt-users] PHP and crontab
- From: Kris Dahl <krislists@xxxxxxxxxxxxx>
- Date: Mon Jun 5 14:18:21 2000
on 6/3/00 11:23 AM, Joe Bonner at jobo@xxxxxxxx wrote:
> Hi folks,
>
> I am trying to use crontab to run a PHP script every 15 minutes on a Raq3.
> Got the timing, and the path set up correctly, but I get a permission denied
> error when it tries to run. Anyone have a solution, work around, or other
> method to automatically run a PHP script? PHP3 is installed as an Apache
> module.
How are you going about running it?
The reason I as is because technically, PHP is a preparser language, not a
scripting language. PHP doesn't have an interpreter on a command line type
basis--it requires Apache to parse the file with mod_php. I suppose if you
have PHP installed as a CGI you could probably get it to work on the command
line, I guess.
so, if you are doing somthing like (in your crontab);
0 0 * * * * /home/sites/home/web/myscript.php3
its definitely not going to work.
0 0 * * * * curl http://www.yoursite.com/myscript.php3
0 0 * * * * lynx -dump http://www.yoursite.com/myscript.php3
will every night at midnight will execute cURL (a killer command line stdout
web browser/tool) or use Lynx to essentially do the same thing,
respectively.
-k