[Techtalk] A PHP script in a crontab.
adam
oz_prophet at internode.on.net
Sat Jan 29 00:00:51 EST 2005
> I have written a PHP script that I want to be executed
> automatically by using cron. But the problem is that
> nothing happens when I run it that way.
>
> The script runs in a web browser, and works as I want it
> to, but when I put it in a cron tab, nothing happens. I
> can think of 2 possible causes of error. (1) I am
> calling it wrong, I have been told by the web hoster that
> the call statement should be something like this:
>
> "GET http://www.hostyorkshire.com/scgi-bin/script.php >
> /dev/null "
GET is an alias installed by lib-web-perl... basically it's
a single-event, non-rendering webbrowser...
to the script, this will seem almost the same as if a real
browser got the file (different headers are the only thing)
> I am not sure what the GET does! This doesn't work.
>
> (2) the other possible cause is that the PHP code won't
> work if its not executed in a web browser. Does anyone
> know if this is so, and what I have to do to make it
> work?
>
> thanks
>
> sue
>
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
> http://mailman.linuxchix.org/mailman/listinfo/techtalk
More information about the Techtalk
mailing list