The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 04-25-2007
cbkihong cbkihong is offline
Moderator
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,422
What about this (adjust path to php executable below)?

30 * * * * /usr/bin/php /home/www/inc/crontab.php

Note that your host may not necessarily have the php executable installed if it is just meant to run as a module to Apache. Only you (or your host admin) will know how the PHP is configured. In that case, you will not be able to run PHP scripts on the command line.

By the way the following works for me:

a.php:

#!/usr/bin/php
<?php phpinfo() ?>

chmod +x a.php
./a.php

So you probably may do it too.
Reply With Quote