How to stop Wget Cron jobs creating log files in home directory?
If you’re using /usr/bin/wget to run your Cronjobs you might notice that every time that cron runs – wget will also creates a log file and will places in your home directory. If you run cron too often (every few minutes) it can add up very quickly and pretty soon you’ll end up with thousands of useless (junk) log files in your home directory. Also your disk space could get consumed especially if you’re on shared hosting or have limited amounts of disk space available. We don’t want anything of that.
Solution is pretty simple actually. All you need to do is add an extra parameter -O /dev/null
So your wget command would look something like this:
/us/bin/wget -O /dev/null http://www.script.com/script.php
This will tell to save output to /dev/null – meaning not to save it at all..
It’s as simple as that. Let me know in comments if this worked out!
July 27, 2015 - 5:46 pm
Excellent blog here! Also your website rather a lot up very fast!
What host are you using? Can I get your associate link to
your host? I desire my website loaded up as quickly
as yours lol
September 8, 2015 - 9:40 am
You can contact me using contact form and I can help you out speed up your site…