如何以每天,每周,每月为基础执行任务 [英] how to execute the task at base as daily,weekly,monthly

查看:101
本文介绍了如何以每天,每周,每月为基础执行任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在窗口应用程序中以每天,每周,每月,每年为基础执行任务.如何为此目的使用threading.timer().任何人都可以告诉我这样的示例.
我想在此基础上执行任务.

how to execute the task at base as daily,weekly,monthly,yearly in window application.how to used the threading.timer() for this purpose.any one can tell me the example of this.
i want to execute the task at this base.
thanks in advance.

推荐答案

您最好为此目的使用Windows Task Scheduler,请参阅
You better use the Windows Task Scheduler for the purpose, see Task Scheduler (Windows)[^].


您可以在Windows Scheduler中包含此任务(程序) .
或者,您可以创建Windows服务来执行此操作.

为此,使用计时器不是最佳选择.
You can include this task (program) in the Windows Scheduler.
Or you can create a Windows Service to do this.

Using a timer for this is not the best option.


Carlo和amp; Abhinav是正确的.这里有些文章会为您提供帮助,请参考这些

TaskScheduler [如何使用SQL Server选择预定日期的记录 [ Quartz.Net [ ^ ]
Both Carlo & Abhinav are right. Here some articles will help you, refer these

TaskScheduler[^]

How to Use SQL Server to Select Records for a Scheduled Date[^]

Also you can use Quartz.Net[^]


这篇关于如何以每天,每周,每月为基础执行任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆