reminder.pl - Notification of Important Dates

Download this program

SYNOPSIS

        reminder.pl  my.reminder    # Normal case, sends Email

        reminder.pl  *.reminder     # Normal case, sends Email

        reminder.pl -debug 1  test.txt   # Use this for debugging

DESCRIPTION

Use this program manually or in a cron job to generate Email to people regarding upcoming events they wish to be notified of. The program checks the current date against a list of interesting dates and generates Email to a set of individuals a few days beforehand.

This is the 'background task' of a system of reminders. See Webfile ( http://www.hps.com/~tpg/toolbox/index.php?file=webfile) for a way to manage the config file for reminders using a browser.

Output from the program is an Email sent to a list you designate. The body of the Email looks like this:

  TO: tpg@hps.com
  Subject: Upcoming Events

  Birthday for John Smith (08/04) is 10 days away

  URL=http://www.somedomain.com/remind/my.html

  See http://www.all-yours.net/postcard/ for postcards

OPTIONS

-daysb4 N
Specifies the number of days before the event that notices will be generated. Notices are sent N days beforehand and every day <= N/2. The default is 10. This can also be set in the configuration file.

-debug N
Enables debugging to show you what was found. If this is set, no Email is sent. The default is 0. This can also be set in the configuration file.

-comment string
Specifies a comment string that will be included in the Email in addition to the value of -url. This can also be set in the configuration file.

-help
Shows you this help file.

-mailto address
Specifies an Email address to whom the Email is sent. This can also be set in the configuration file.

-today date
Specifies what today's date is. This is useful when debugging. This defaults to today's date.

-url URL
Specifies a URL to be included in the Email. This can also be set in the configuration file.

PARAMETERS

cfgfile1 [cfgfile2 ... cfgfileN]
Specifies a set of configuration files to read and check for reminders to generate.

CONFIG FILE

The configuration file consists of various keyword=value lines which control options to the program. These need to come before anything else. Keywords (upper case only) that are recognized are:

COMMENT=string
specifies a comment string which is included in the Email.

DAYSB4=N
specifies the number of days before the event that notices will be generated.

DEBUG=0|1
provides a means to enable or disable debugging.

DISABLE=yes|no
provides a simple way for you to disable this configuration. You might want to use this if you are going on vacation for some long period or for whatever reason you do not want Email generated.

EMAILDEST=address
specifies to whom Email will be sent. You must provide this.

TODAY=string
specifies what today's date is. 'String' can be any value valid with ParseDate in Date::Manip like: ``today'', ``1st thursday in June 1992'', ``05/10/93'', ``12:30 Dec 12th 1880'', ``8:00pm december tenth''. This is useful when debugging.

URL=string
specifies a URL to be included in all Emails. I often use this to remind me of a site I can use to send an electronic postcard from.

The rest of the file consists of lines describing events you are interested in. Each line consists of three parts like this:

   EVENT  MM/DD  COMMENT
EVENT
identifies the event as a birthday or whatever. It has no particular meaning to the program.

MM/DD
identifies month and day of the event. Year is not specified.

COMMENT
is a string used to decribe the event and is sent as part of the Email. It has no particular meaning to the program.

Here's a sample configuration file.

  #
  #   Use this to give warnings of upcoming events
  #
  #   Remove comment to stop this when you are gone etc
  #DISABLE=yes
  #   Set number of days of lead we are looking for
  DAYSB4=8
  #   Specify destination of Email target
  EMAILDEST=tpg@hps.com
  #   Set comment lines which will always be sent when 
  #   there is something to remind you of
  COMMENT=See http://www.all-yours.net/postcard/ for postcards

  # event  mm/dd   Comment
  Birthday 06/04   Fred Smyth
  Birthday 10/01   Katrina

  Valentines 02/14 Wife
  Valentines 02/14 Mistress

  St_Urho's_Day  03/16  Ursala
  Anniversary 08/21  Our wedding anniversary

EXIT

If no fatal errors are detected, the program exits with a return code of 0.

AUTHOR

Written by Terry Gliedt <tpg@hps.com> in 2001-2004. This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; See http://www.gnu.org/copyleft/gpl.html