[SLUG] cron
Stephen O'Neill
soneill84 at yahoo.co.uk
Mon Sep 18 15:57:09 BST 2006
john at johnallsopp.co.uk wrote:
> I've set up my first cron job on a remote web server. I wanted it to
> run a php web page. I hadn't thought that, obviously that's not going
> to happen (my php page would need to be interpreted by a web server
> before it comes alive).
You can run a php file from the command line.
Assuming that php is in your path (whereis php) then you can do:
php myfile.php
However, this won't run your file in the full apache web environment
with all the environment variables etc - because php isn't being run by
apache, it's being run by your shell.
If you need this then look at wget:
wget www.example.com/somefile.php
Hope that helps,
Steve O
___________________________________________________________
All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine
http://uk.docs.yahoo.com/nowyoucan.html
More information about the Scarborough
mailing list