Instead of using a timer, I tried to use the soil moisture sensor to build this hydroponic system and it worked! Link on how to build the automated water pumping system - https://www.youtube.com/watch?v=wFPEO_c_hTg&t=159s