If you REALLY want to do it this way and rely on a scheduler, all you have to do is schedule two command lines to be run. The first at your specified start time and the second at your stop time:
net start servicename
net stop servicename
No code required...