C#在特定时间执行功能 [英] C# Execute function at specific time

查看:117
本文介绍了C#在特定时间执行功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了一个小的Windows窗体程序做一些文件的一些自动备份我的磁盘上。现在我需要按下一个按钮,在执行之前,但我想使程序运行,并在凌晨3点运行,做备份的功能。

I made a little Windows Forms program to do some auto backup of some files on my disk. Right now I need to push a button before it is executed, but I want to make the program running and at 3am run the function that does the backup.

我研究了一下,发现我需要为这个计时器,但我失败了,因此执行在特定时间使用它。

I've researched a bit and found out i need a timer for this, but I've failed to use it so it executes at a specific time.

我希望你能帮助我。 : - )

I hope you can help me out. :-)

谢谢!

推荐答案

不是100%的欺骗,但你会发现的这太问题有趣。 ;)

Not a 100% dupe, but you'll find this SO question interesting. ;)

包含引用 quartzTimer 以及其他选项。

Contains references to quartzTimer and other options.

这篇关于C#在特定时间执行功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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