Make cron stop sending e-mails? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Make cron stop sending e-mails?

Mike BMike B Posts: 136Member
How do I make cron stop sending e-mails? When I set the cron job to mail to nobody, it gets mailed to root. When I leave it as the user the job runs as (www), it gets mailed to www...

I have a job run every minute that cleans up sensitive (IMO :D) data...and it runs as www...so if I forget to clean it out for a while, I find 1000 e-mails to delete in www....


----

Comments

  • satharielsathariel Posts: 59Member
    : How do I make cron stop sending e-mails? When I set the cron job to mail to nobody, it gets mailed to root. When I leave it as the user the job runs as (www), it gets mailed to www...
    :
    : I have a job run every minute that cleans up sensitive (IMO :D) data...and it runs as www...so if I forget to clean it out for a while, I find 1000 e-mails to delete in www....
    :
    :
    : ----
    :

    Hi,

    just forward the output from the cronjob to >/dev/null. If You dont want to see the error-messages You can also forward errors to /dev/null with 2>&1.
    Example:

    * * * * * /home/example/example >/dev/null 2>&1

    regards

    Thorsten
Sign In or Register to comment.