This sketch uses a DS-3231 Real Time Clock and a DHT22 temp/humidity sensor to decide when relays are closed that forms the circuit for AC devices.
This is the start of a very large hydroponics controller, but that will take me years to build so I will share it to the community in functional phases.
Enjoy and adjust as needed