I need to set timers for relay with esp-01

Read through this whole topic and experiment until you understand it better… the code section you have is for the seconds part, not the hours.