NGINX php-cli cron job not working - Raspberry Pi Forums


i can run php script via command line have php-cli installed. i'm trying run php script every minute nothing working. i've tried:

code: select all

* * * * * /usr/bin/php /usr/share/nginx/www/index.php
also:

code: select all

* * * * * php -f /usr/share/nginx/www/index.php
php file simple:

code: select all

<?php         $file = 'test.txt';         $handle = fopen($file, 'a') or die("can't open file");         $string = "testing\n";         fwrite($handle, $string);         fclose($handle); ?>
both index , test files have 777 permissions. i've tried setting crontab -e root user , pi user...nothing works. please out.



raspberrypi



Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support