Despite using a simple datetimepython module, you can implement everything you need, a much more powerful python-dateutil extension . available, especially if you need to work with recurring events. The code below should give you an idea of how to achieve your goal:
from datetime import *
from dateutil.rrule import rrule, YEARLY
td_8am = timedelta(seconds=3600*8)
td_jobfrequency = timedelta(seconds=3600)
bday = date(1960, 5, 12)
td_delta = timedelta(days=6)
tz_diff = timedelta(seconds=3600*5)
sday = date.today()
occr = rrule(YEARLY, bymonth=bday.month, bymonthday=bday.day, dtstart=sday, count=1)[0]
occr -= (td_delta + td_8am + tz_diff)
if datetime.now() - td_jobfrequency < occr < datetime.now():
print occr, '@todo: send the reminder'
else:
print occr, 'no reminder'
, , delta , timezone birthday, . ( ) .
, , - ( , ) . , , , , . .