If you want to throw away the output of the script, tell wget to throw it away with -O /dev/null
using wget in cron to hit a php page begs the question of whether you couldn't just be running the php page with the php cli by installing the php5-cli package and running php /path/to/phpscript.php
Is this really a script that needs to be accessible form both the web and from cron?
Используйте -o / dev / null
и -O / dev / null
, чтобы отказаться от загрузки и вывода wget.
Запускать его из оболочки, как предлагалось, кажется лучше. После редактирования вы можете просто запустить тот же сценарий оболочки.
Похоже, что вы запускаете свой сценарий как root. По возможности такие скрипты лучше не запускать от имени root.