更新时间:2022-10-18 18:01:32
检查此链接,解释如何安排Windows服务和计时器来完成您的要求。
http://www.aspfree.com/c/a/C-Sharp/Timer-Objects-in-Windows-Services-with-C-NET/ [ ^ ]
希望这有帮助
您可以使用System.Timer参见此处 [ ^ ],例如代码。
你可以轻松地使用Windows服务和webservice
点击这里结合Web和Windows服务以预定的时间间隔运行ASP.NET代码 [ ^ ]
I want to call a method for every 1min can anyone please give a sample code. I tried doing using thread but its not helping me
check this link which explains how to schedule a windows service and timer to accomplish your requirement .
http://www.aspfree.com/c/a/C-Sharp/Timer-Objects-in-Windows-Services-with-C-NET/[^]
Hope this helps
You can use a System.Timer see here[^] for example code.
You can do it with windows service and webservice easily
Check here Combine Web and Windows Services to Run Your ASP.NET Code at Scheduled Intervals[^]