How to Stop Cron Output?

I have a PHP application that requires a cron job, and I’m currently using the wget command for the cron. However, I’m getting a lot of output in the log file that I don’t want. How can I stop the cron output and have the code run without generating logs?

* * * * * wget http://www.domain.com/cron.php

This is my cron command.

To stop cron output when using the wget command, you can redirect the standard output (stdout) and standard error (stderr) to /dev/null. Here’s the modified cron command:

* * * * * wget http://www.domain.com/cron.php >/dev/null 2>&1

This will send the output to the null device.