Re: Q: How to Set up A Daily E-Mail Reminder?

From: Russell Shaw (rjshawN_o_at_s_pam.netspace.net.au)
Date: 04/24/05


Date: Sun, 24 Apr 2005 19:40:04 +1000

qquito wrote:
> Hello, All:
>
> I use a Sun Microsystems UNIX machine, and I am trying to use the
> at-job to let the machine send myself an e-mail message on a daily
> basis to remind myself of something.
>
> I know some basics of shell script, but I don't know how to put the
> task of "sending an e-mail to myself (or anybody for that matter)" into
> a shell script.
>
> Would anybody like to help? It does not have to be limited to shell
> script though, I guess.
>
> Thank you in advance!
>
> Have a nice day.
>
> Roland

Install "remind" and you can do all kinds of things. man remind:

  NIFTY EXAMPLES

    This section is a sampling of what you can do with Remind.

         REM 5 Feb 1991 AT 14:00 +45 *30 \
         RUN mail -s "Meeting at %2" $LOGNAME </dev/null &

    On 5 February, 1991, this reminder will mail you reminders of a 2:00pm meeting at 1:15, 1:45 and
2:00. The subject of the mail message will be "Meeting at 2:00pm" and the body of the message will
be blank.

         REM AT 17:00 RUN echo "5:00pm - GO HOME!" | xless -g +0+0 &

    This reminder will pop up an xless window at 5:00pm every day. The xless window will contain
the line "5:00pm - GO HOME!"

         REM AT 23:59 RUN (sleep 120; remind -a [filename()]) &

        This reminder will run at one minute to midnight. It will cause a new Remind process to
start at one minute past midnight. This allows you to have a continuous reminder service so you can
work through the night and still get timed reminders for early in the morning. Note that this trick
is no longer necessary, providing you run Remind in daemon mode.

         remind -c12 /dev/null Jan 1993

    This invocation of Remind will cause it to print a calendar for 1993, with all entries left blank.

         REM CAL [trigdate()-date(year(trigdate()), 1, 1)+1]

    This example puts an entry in each box of a calendar showing the number (1-365 or 366) of the
day of the year.



Relevant Pages