What is your budget and your timescale for this work.
How are you going to know that it is 10:30:00? Is that AM or PM? How are you going to know that it is Thursday? Or Saturday? Or Tuesday?
Once you have a way to answer those questions, turning a pin on is trivial. Turning it off at 10:30:15 is equally trivial.
nerfayer: pls pls give me code
For free? Not a chance. If you want to try to write something yourself, I'm sure the people on the board will help you with it. But if you want someone to just give you the code then you're going to have to post over in the Gigs and Collaborations section and offer to pay.
DO NOT CROSS-POST, IT WASTES TIME.