|
|
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi, I am trying to use a PHP script as a test for a cron job.
My crontab is 1 line: 30 * * * * /home/www/inc/crontab.php if I test the file through the browser (ie. http://www.tjsc.com.vn/inc/crontab.php), the PHP script works -- so there is nothing wrong with the PHP script itself or the path. I aked my hosting admin for assistance and the error he keeps getting is: /bin/sh: line 1: /home/www/inc/crontab.php: Permission denied What permission do I need to set to get it to work??? |
|
|||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|