[Techtalk] A PHP script in a crontab.

Sue Stones suzo at spin.net.au
Fri Jan 28 23:47:17 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 "

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



More information about the Techtalk mailing list