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

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.