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

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -