User Tools

Site Tools


ubuntu:cron:send_cron_results_to_specified_email_account

Ubuntu - Cron - Send Cron Results to Specified Email Account

By default, cron sends the reports of scheduled cron jobs to the mail of the user who scheduled the job.

You can redirect this by changing the mail variable’s value, as shown in the next example.

# crontab -l
MAIL=bob@admin.com
0 2 * * * /script/backup.sh

After the cron job backup.sh is executed, cron will send the reports to the mail address bob@admin.com.

ubuntu/cron/send_cron_results_to_specified_email_account.txt · Last modified: 2020/07/15 09:30 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki