Piping wget output to /dev/null in cron

You could do it like this:

*/5 * * * * wget -O /dev/null -o /dev/null example.com

Here -O sends the downloaded file to /dev/null and -o logs to /dev/null instead of stderr. That way redirection is not needed at all.

Leave a Comment