Send Yourself Reminder Mail
I use the at command () to send myself reminders. The at job runs a mail program () and feeds the body of the message to the mailer's standard input. Examples:
- To send a one-line reminder, I use a one-line command like this:
%
at 0427 tuesdayat>echo "send summary to Tim today" | mail jpeek@jpeek.comat> [CTRL-d] %It sends mail at (in this case) 4:27 a.m. on the next Tuesday. The mail says: "send summary to Tim today."
- To send more than one line, you can use a temporary file:
%
vi msgfileput message body in msgfile... %at 0808 feb 28at>mail jpeek@jpeek.com < msgfileat>rm msgfileat> [CTRL-d] %
- Combine the output of UNIX commands and text with backquotes () and a here document ():
%
at 0115at>mail -s "Hard-working people" tom << ENDat>These employees are working late. They deserve a bonus:at>`w`at>ENDat> [CTRL-d] %That sends a message to tom at 1:15 a.m. tonight. (This mailer accepts a subject on the command line with its -s option. The output of the w command gives detailed information about logged-in users; not all systems have it.) Unless you understand how to quote here-document text (), the message shouldn't have anything but letters, numbers, commas, and periods.
If your system administrator has set up the calendar () program, it's good for easy one-line reminders on particular days. If your UNIX has personal crontabs () that can send periodic reminders every Tuesday, every hour, or whatever: use the commands in items 1 or 2 above.
- JP