我有一个 Web 服务 (amsx),我想在其中每天调用一个方法,该怎么做?也请不要第三方 dll 的
public List<myClass> Mymethod(){
List<myClass> Collect = new List<myClass>();
if (list.Count == 0)
{
myfunction(); // my function must be invoked every day at 7 to update list
Collection = list;
return Collect;
}
else
{
Collection = list;
return Collect;
}
}
最佳答案
查看 MSDN 文章 - Combine Web and Windows Services to Run Your ASP.NET Code at Scheduled Intervals和博文 - Easy Background Tasks in ASP.NET杰夫·阿特伍德。
关于c# - 每天早上 7 点调用 Web 服务方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8193258/