I leave my pool in the hands of relatively inexperienced maintenance people from time to time and need to have it fairly well automated and electronically controlled. I use two timers, one on the main pump and one on the cleaner robot. And I have a thermostat to protect against frozen pipes. ( I live in southern Mississippi where we don't drain pools but temps can drop to the low 20's). I've developed a fairly simple control system using relatively inexpensive parts.
The heart of the system is a pair of Tightwatt timers to control the main pool pump and the cleaner. The Tightwatts are electronic timers that allow simple programming to vary the time the pumps run according to the season of the year. I have them set to run the pool pump for 16 hours in the summer in two 8-hour segments starting at 2 AM and 2 PM and 8 hours in the winter, also in two 4-hour segments. The Tightwatt knows the current date and varies the run time as summer turns to winter and back again. The timer for the cleaner is set to run for one hour a day year round. (Of course I can vary the cleaner time as circumstances warrant).
I use a greenhouse thermostat to protect against frozen pipes. There are several pool thermostats on the pool product websites but they seem expensive. The greenhouse thermostat from KKontrols does the same job at much less cost.
I've attached a schematic wiring diagram to show the electrical hookup I've developed.