Windows Service - How to make task run at several specific times?
问题 I have a windows service running. Within it the task runs currently at 7pm every day. What is the best way to have it run say fir example at 9.45am, 11.45am, 2pm, 3.45pm, 5pm and 5.45pm. I know i can have scheduled task to run the function but i would like to know how to do this within my windows service. Current code below: private Timer _timer; private DateTime _lastRun = DateTime.Now; private static readonly log4net.ILog log = log4net.LogManager.GetLogger (System.Reflection.MethodBase