How to Use Cron & MailTo
Cron is the Linux scheduling program that is used to execute scripts on a Linux system on a predefined timetable (such as every 5 minutes, once a week, every Monday at 9 a.m., etc). When a script finishes executing in Cron, you can have it send an email to you using the MailTo function on the server. This will cause Cron to send an email containing the output of the script to the address you specify.
Instructions
-
-
1
Log in to your Linux server.
-
2
Type "crontab -e" to view the list of Cron jobs.
-
-
3
Go to the end of the Cron task that you want to have mailed to a specific email address.
-
4
Type ">> mailto:youremail@example.org" (substituting in the desired email address for the example given here) at the end of the task.
-
5
Save the Cron task list by pressing "CTRL" and "X."
-
1