C#以编程方式运行方法 [英] C# run method programatically
问题描述
您好,
我想在我的代码上添加方法。
此方法每天早上6点运行productceller方法。
并且每天早上7点运行reportCaller方法,并且每天每15分钟运行一次reportCaller方法。
我该怎么办?< br $>
i写一些代码,但它无法正常工作。例如reportcaller方法运行4次,但产品调用者不工作等。
如何使用此方法以及我可以使用哪些方法?
我尝试过的方法:
i使用它的计时器,时间跨度等但它不起作用:(
你会发现的问题是应用程序总是必须运行。相反,您可以使用Window的任务计划程序启动应用程序来运行定时任务。现在您只需要担心要执行的任务。
Windows任务计划程序 - Google搜索 [ ^ ]
Hello,
I want to add method on my code.
This method run productceller methods on every day 6 am.
and run reportCaller methods on every day 7 am and its run reportCaller method every 15 minutes every day.
How can i do this?
i write some codes but its not working correctly.For example reportcaller method run 4 times but the product caller is not work etc.
How can i do this method and what can i use for?
What I have tried:
i use it timer,timespan etc but its not worked:(
The problem you will find is that the app always has to run. Instead, you can use Window's Task Scheduler to launch an app to run a timed task. Now you only have worry about the tasks to be performed.
Windows Task Scheduler - Google Search[^]
这篇关于C#以编程方式运行方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!