
I am trying to write a cron task to call wget on a url. The cron runs fine, but every time it runs it will creates a cron.php.X file in my home directory. I’ve tried to turn off output using the –quiet option but it’s still outputting a new file with every running.
To solve the output file when cronjob run with wget. you not only use –quiet option only. you need to add -0 option too.
Example
5 * * * * wget --quiet -O /dev/null http://example.com/cron/cron.php