RE: [PHP] Using php as a scripting language within cron jobs?
| From: | Jon Haworth | Date: | Fri, 17 May 2002 12:03:53 +0000 |
| Subject: | RE: [PHP] Using php as a scripting language within cron jobs? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-98049@lists.php.net to get a copy of this message | ||
Hi Michael,
> > Set your cron job up as "lynx -dump
> > http://www.myserver.com/myscript.php
>
> > /dev/null" (or pipe it to a logfile if you fancy) - obviously, you'll
need
> > lynx installed for this to work :-)
>
> but this is only needed only if you compile php into apache or am i wrong?
> if i have the cgi version installed, i can call the php script
> directly from the shell. The only thing for me to do then, is to set
> #!/path.to/php in the first line of the script, right?
Spot on. As a couple of others have pointed out, you can compile PHP to be a
standalone interpreter and then write scripts for it - personally I always
use it as a module, and I find using lynx works perfectly... if it ain't
broken, don't fix it...
Cheers
Jon