Thursday, April 4, 2024
Centos Crontab

cron send alert to email

Specify Email for Each Script

If we don’t want all output to go to the same email address we can specify the output of a particular script to go to a different email address:

59 */6 * * * | mail -s "Subject of Mail" 

Email Alerts for All but One

If you have a specific script in your crontab that you don’t want output or errors emailed to you, simply add, ‘>/dev/null 2>&1’ to the end of the command.

59 */6 * * * >/dev/null 2>&1 
(Visited 33 times, 1 visits today)
Baca Juga :  Cara Update Centos 8 untuk Pemula

Similar Posts