Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to execute Windows service at a specified time daily

I need to schedule windows service on daily basis at pre-defined time to run and then sleep till the next day, How can i do that?

Solution:

Added a timer to timeout every 30 minutes and then validate if the time of the day has reached, if yes then perform the desired function, make sure that, mark a flag once its done for the day.

like image 269
BT. Avatar asked Dec 01 '22 06:12

BT.


2 Answers

You don't. You setup a scheduled task; services as (generally) for background running processes.

like image 175
Marc Gravell Avatar answered Dec 04 '22 22:12

Marc Gravell


How might I schedule a C# Windows service to perform a task daily

like image 35
SwDevMan81 Avatar answered Dec 04 '22 21:12

SwDevMan81