自动调用.NET Web服务 [英] Calling .NET webservice automatically
问题描述
我是新来的.NET和Web服务。我的目标是创建一个Web服务的.asmx在C#中它会自动调用它本身在每12小时。所以,不会有任何人调用它的方法,但它会定期调用它本身。我很困惑如何与.NET Web服务做到这一点。
I am new to .NET and web services. My aim is to create a .asmx webservice in C# which will invoke itself in every 12 hours automatically. So, there won't be anybody invoking its methods but it will invoke itself regularly. I am confused about how to do this with .NET webservices.
推荐答案
我的建议是使用一个 Windows服务
或控制台应用程序
计划运行,每12小时的主机系统的调度软件(Windows任务计划程序,cron的,等等)。
My suggestion would be to use either a windows service
or a console app
scheduled to run every 12 hours by the host system's scheduling software (Windows Task Scheduler, cron, etc.).
<一个href="http://stackoverflow.com/questions/24536751/how-to-execute-a-method-in-asp-net-mvc-for-every-24-hours">Here是对类似要求一个有趣的讨论,像你这样的,以定期运行的方法和大卫给了不同的选项在那里。
Here is an interesting discussion on the similar requirement like yours to run a method at regular intervals and David has given various options in there.
这篇关于自动调用.NET Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!