import datetime
import time
T = datetime.datetime(year=2011, month=12, day=25, hour=0, minute=0, second=0)
interval = 60
delta = T-datetime.datetime.now()
while delta > datetime.timedelta(0):
print "T minus "+str(delta)
if delta.total_seconds() < 60:
time.sleep(min(1, delta.total_seconds()))
elif delta.total_seconds() < 60+interval:
time.sleep(delta.total_seconds()-60)
else:
time.sleep(interval)
delta = T-datetime.datetime.now()
print str(datetime.datetime.now())
raw_input("XMAS!!!")
With adaptive sleep, so you have seconds-wise countdown in the last remaining minute.
The min() lets the script fire at almost precisely the desired point in time.
I like it :) - I sometimes just cannot resist to solve some weird problem the way how I would solve it if I really had it...