Search code examples
cronsmtpcron-task

stop receiving email from cron job and smtp every 15 min


I have set a cronjob for every 15 mins and have also set my SMTP email, but this cron job is sending me an email every 15 min with subject as my cron command and user as "root" . so i want to stop receiving this email without disturbing my SMTP config


Solution

  • i just append this to my cron command

    /dev/null 2>&1
    

    sources:

    http://www.cyberciti.biz/faq/disable-the-mail-alert-by-crontab-command/