Can a windows service be set to run at a specific time..?
Example
From 8:00 am to 5:00pm run process
From 5:00 pm to 8:00am run process
This process can run daily, weekly or a single day..
Please let me know, your thoughts
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I faced a similar situation where I had to develop a service which would do something only during trading time which is from 11:00 am to 3:00 pm everyday in that specific case. It would remain idle the rest of the day. I am sharing what I did in my case. I am not sure whether it would be helpful for you but I hope that it will be.
Two variables maintaining the starting time and ending time
A method to check whether it is trading time
Then where it is necessary to check the time and execute something depending on that: