How to Silence Everything When Running Cron

By default, when you set up a script or task to be executed by Cron, the Linux scheduling program, the result of the running of the script or task is exported to the command line interface, or to an email to the root user on the server. If you want, you can make your Cron tasks silent by adding a line on to the end of them that causes any outputs from them to be deleted, instead of being pushed to a user.

Instructions

    • 1

      Log in to your server where Cron is running.

    • 2

      Open the list of Cron tasks by typing "crontab -e" and pressing "Enter."

    • 3

      Add "> dev/nul" to the end of all of the tasks. This causes any task outputs to go to the Linux equivalent of the trash can or recycle bin, so that none of the tasks produce any output on the machine.

    • 4

      Press "CTRL" and "X" to save and close the Cron task file.

Related Searches:

Comments

Related Ads

Featured