You'll also have to make sure that either the script starts with a #! reference to the php interpreter (usually #!/usr/bin/php), or that the cron job invokes the interpreter using something like /usr/bin/php /path/to/script.php. If you choose the first (I think it's a bit easier), make sure the file permissions allow it to be executed.

Lloyd Brown

Frank Sorenson wrote:

On Wed, 21 Apr 2004, Mark Gardner said:


I'm Running SUSE LINUX 9.0 Professional

How do I get a PHP script "script.php" to run as a cron job? I want it
to run daily @ 3:00 AM


Mark Gardner



Add to /etc/crontab:


00 3 * * * root /path/to/script.php >/dev/null 2>&1

Frank
---------------------------------------------------------------------------
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
[EMAIL PROTECTED]

____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list







____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to