Set email alerts for cron jobs

After scheduling the cron jobs, its important to ensure that they are running without any errors.  In such cases it’s important to set email alerts for crontab.

To set email alert for your cron jobs;

Edit the crontab entry:

$ crontab -e

and enter the email id to which alerts should be sent out:

MAILTO=you@yourdomainname.com

If MAILTO is defined but empty (MAILTO=”"), no mail will be sent.

MAILTO=""

Otherwise mail is sent to the owner of the crontab.

Leave a comment

0 Comments.

Leave a Reply


[ Ctrl + Enter ]

Comment moderation is enabled. Your comment may take some time to appear.