每天使用窗口服务一次运行任务 [英] Run task at one time in daily using window services
本文介绍了每天使用窗口服务一次运行任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请帮助我
我提供一个窗口服务,每天晚上9点执行一些任务.
我该怎么做?
Please help me
I make one window service that perform some task at 9 pm daily.
How can i do this?
推荐答案
好吧,只需创建一个简单的Windows服务并进行部署即可.
看看这些文章:
在C#中创建基本Windows服务 [使用C#创建Windows服务 [在C#中创建Windows服务 [
Well just create a simple windows service and deploy it.
Have a look at these articles:
Creating a Basic Windows Service in C#[^]
Creating a Windows Service with C#[^]
Creating a Windows Service in C#[^]
If needed more, just google for it. Read about them and you should be able to do it.
如果该服务所做的只是每天唤醒一次,请执行某项操作,然后再入睡另一天,则可能作为计划与Windows Task Scheduler一起运行的普通应用程序,情况会更好.
如果要使用服务,则可以使用 timer [ ^ ].
If all that the service does is wake up once a day, do something and then go back to sleep for another day then it might be better off as a normal application that''s scheduled to run with the Windows Task Scheduler.
If you want to use a service then you can schedule callbacks to be fired at a periodic rate using at timer[^].
这篇关于每天使用窗口服务一次运行任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文