The easiest way, in my opinion, is to make your PHP script into a shell 
script or to call it with PHP yourself. A Red Hat Linux box is going to 
have a command line PHP located somewhere like /usr/bin/php. So, make 
the first line of your PHP script something like this:

#! /usr/bin/php

Make sure it is executable (chmod 755 script.php, for example), and 
execute it:


With cron, just call the script using the full path, and you're all set.

Happy hacking.


Joseph Szobody wrote:

>Folks, I have a PHP script that needs to be executed automatically every 15 minutes. 
>I have the option of doing this on a RedHat linux box, or on Windows 2000 Server.
>How would I do this (on either platform) and which would be easier?

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to