I had created a windows service and i want that the service will Schedule to run daily at 6:00 Am. Below is the code which i had written:-
public Service1()
Here, you have 2 ways to execute your application to run at 6 AM daily.
1) Create a console application and through windows scheduler execute on 6 AM.
2) Create a timer (System.Timers.Timer) in your windows service which executes on every defined interval and in your function, you have to check if the system time = 6 AM then execute your code
ServiceTimer = new System.Timers.Timer();
ServiceTimer.Enabled = true;
ServiceTimer.Interval = 60000 * Interval;
ServiceTimer.Elapsed += new System.Timers.ElapsedEventHandler(your function);
Note: In your function you have to write the code to execute your method on 6 AM only not every time