Get a outl timer you can buy them on amazon you can set it up and it will turn on and off automatically. https://www.amazon.com/Century-Indoor-24-Hour-Mechanical-Outlet/dp/B01LPSGBZS/ref=asc_df_B01LPSGBZS/?tag=hyprod-20&linkCode=df0&hvadid=167139094796&hvpos=&hvnetw=g&hvrand=16584754111999061686&hvpone=&hvptwo=&hvqmt=&hvdev=m&hvdvcmdl=&hvlocint=&hvlocphy=9024594&hvtargid=pla-307469470485&psc=1
I put these on gooseneck desk lamps with a timer. I think they’re a little more pleasing than some lights and they have a broad spectrum. Very bright, but need to be relatively close to the plant.
SANSI LED Grow Lights for Indoor Plants, Full Spectrum,15-Watt Grow Light Bulb,Plant Light Bulb with Balanced Lighting for Seeds Greens for Indoor Pla https://www.amazon.com/dp/B01NCVWFUE/ref=cm_sw_r_cp_apip_IILQPQb4Mli6y
BN-LINK BND-60/U47 Indoor Mini 24-Hour Mechanical Outlet Timer, 3-Prong, 2-Pack https://www.amazon.com/dp/B01LPSGBZS/ref=cm_sw_r_cp_api_glt_fabc_DV9BJCKC58F7DMH1H7E9?_encoding=UTF8&psc=1
Just plug something like this into your outlet and then the chargers into a power strip off the timer:
https://www.amazon.com/Century-Indoor-24-Hour-Mechanical-Outlet/dp/B01LPSGBZS/
If you’d prefer, I think some smart outlets have timers built in. Not sure though.
You could get a timer like this one. It only has 30 minute intervals but you can have them as often as you want.
Honestly just buying outlet plugs with timers is probably the better option than trying to figure out a way to program it with c# and a computer.
https://www.amazon.com/Century-Indoor-24-Hour-Mechanical-Outlet/dp/B01LPSGBZS