Mechanical light timer. Make sure that it is grounded - not all are. Nothing is more reliable, IMO.
Full disclosure... I did just have one fail... it was made in 1997, so 22 years, or so... the plastic got worn out that was "flipping the switch." It did come with more, but I probably lost them twenty years ago.
Digital light timers are OK, but they have batteries that can run down and then they lose their settings with a power outage... more of a pain than they are worth.
I like the ones with green "on" tabs and red "off" tabs (there are many), but the ones at Harbor freight work too, they are just not labeled so write on them with a sharpie which is "on" and which is "timer."