[英]How to Schedule my windows service?
I created 4 wcf services. 我创建了4个wcf服务。 I want to create a windows service with first WCF service will run every one minute and 2 nd service will run after 5 minutes and 3rd service will run every 5 minutes and 4th service will run continuously 30 minutes.The total time of this service is 30minutes.
我想创建一个Windows服务,其中第一个WCF服务将每1分钟运行一次,第二个服务将在5分钟后运行,第三个服务将每5分钟运行一次,第四个服务将连续运行30分钟。此服务的总时间为30分钟。
After 30 minutes the service will reset and run again. 30分钟后,服务将重置并再次运行。
Can any body help me to get this solution.............. 任何人都可以帮助我获得此解决方案..............
Essentially you need a scheduler - a good one for .net applications is Quartz.NET ( http://quartznet.sourceforge.net/ ) 本质上您需要一个调度程序-Quartz.NET( http://quartznet.sourceforge.net/ )对于.net应用程序来说是一个很好的调度程序。
it is very flexible in how you store the schedule specification. 它在存储计划规范方面非常灵活。
您可以使用Windows Task Scheduler进行启动,但是必须自己在代码中编写运行时间。
服务启动时,将开始时间存储在变量中,并检查时间差是否小于30分钟,然后重置计时器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.