Log in using OpenIDCancel OpenID login

Birthdays

Submitted by marble on Tue, 2006-05-16 19:32.
Version:1.3 Release Date:2004-05-26 Status:Final Language:Bash

checkbdays.sh is a small piece of bash shell script designed to be run from cron every morning to check for upcoming birthdays and remind you of them by email. Each birthday can be warned a configurable amount of time in advance. For example, if your sister lives on the other side of the planet to you, you might need a month's notice to get something organised, but for other people it's just nice to know on the day if you see them.

How to use

First, edit the birthdays file. An example one is included in the distribution. The script will look for this in ~/birthdays, but it's easy enough to change the script if you want it to live somewhere else. The file is in tab separated values format, with the fields date, warning, name. Date must be in YYYY-MM-DD format, warning is one of D (warn on the day), T (warn the day before and on the day), W (warn a week in advance, the day before and on the day), or M (warn a month in advance, again a week before, the day before and on the day).

Then edit the checkbirthdays.sh script to change where it sends the mail to, and cause your cron to run it every morning. For traditional crons, a line like:

15 4 * * * ~/checkbdays.sh

should suffice.

Finally, check your email :)

History

Version 1.3
Fixed bug with bash assuming octal where it should have been decimal
Version 1.2
Fixed bug when used on the 3rd of the month (doh!)
Version 1.1
Fixed bug when used on days 1-9 of the month
Version 1.0
Initial release
FileSizeMD5SumDownloads
birthdays-1.3.tar.bz27.44 KB695d69172125b0bf1e74cec1528730aa83
Posted in Submitted by marble on Tue, 2006-05-16 19:32.