json - Crontab not properly executing a php file due to permissions -
i have version.php
script writes on settings.json
file (centos6).
<? $new['time'] = time(); file_put_contents('settings.json', json_encode($new, json_numeric_check));
if login via ssh , execute (with root):
php -q /www/cronjobs/version.php
everything runs fine , settings updated properly. idea php file executed every 5 minutes cronjob, did this:
crontab -e */5 * * * * /usr/bin/php -q /www/cronjobs/version.php >> /www/cronjobs/cron.log 2>&1
but after 5 minutes, settings.json not updated, , cron.log empty. how can add cronjob crontab list? perhaps has permissions? did root , msversion.php, settings.json , cron.log 755 chmoded.
Comments
Post a Comment