hacking a coffee pot

I would use a timer.