Get Birthday alerts in iCal automatically
If you’re anything like me the addition of birthdays being listed in iCal from your Address Book in OS X was one of the best little additions Apple could have done. Unfortunately again, if you’re like me, the fact that whilst seeing the birthdays being listed as all day events is great you don’t look in iCal every day and three days after your Dad’s birthday you open it up to see just how extensive your excuse is going to need to be for missing it! If only Apple would give you the ability to set an alert on the Birthday calendar, be it that morning or a few days before to give you time for gift shopping…

Well fear not because I have the answer to all your problems in one simple little AppleScript that will help you do exactly that by scanning through your Address Book and picking out birthdays for that week and adding new “Birthday Alert” events into iCal all on its own. Isn’t life grand!
Here’s how it works exactly…
One by one the script goes through the people in your Address Book looking at only those that have a “birthday” value set.
If there’s a birthday for a particular individual we check if that birthday is due to happen within the next week. I’ve decided to set it to only look at a week at a time because I run the AppleScript automatically once a week overnight. This way if I happen to add someone’s birthday in for two weeks away it will add a reminder for me and not miss it.
Once we’ve identified all the people who have birthdays in the next week the script jumps into iCal and creates events at a particular time after midnight on that person’s birthday. By default I have it set to 9am, you can quite easily change this to 12 (midday) or 16 (4pm) it’s totally up to you. You can also set the date of the reminder to be a certain number of days prior to their birthday by modifying the default variables.
The events are added into the calendar you specify at the top of the script, I’ve created a new calendar called “Birthday Alerts” but by default it will add them to your “Home” calendar.
Lastly once the event is added in (named “X’s Birthday Alert”) an alert is added to the event so you’ll get a little pop up at the specified time of the event. Clever hey!
At the top of the script are the variables that you can set to your own specific liking (as mentioned above) they are:
numberDaysNotice — how many days before the birthday to alert you, 0 is that day (default 0)
timeOfNotification — the hour you want the notification (default 9)
selectedCalender — the calender in iCal you want to add the events to (default Home)
I have the script setup to run automatically each Sunday by running it as a cronjob using the command line AppleScript launcher “osascript”. Its simply:
“osascript /Users/raj/Documents/birthdayAlert.scpt”
Perhaps I’m a complete idiot and I’m missing a really simple way that you can already do this in iCal or Address Book, if so, let me know, otherwise I hope it makes your life a little easier. Oh and if it doesn’t work for you, sorry, I’ve only tested it under Leopard.
Download it HERE.






