用于定时操作的 C# 库
您知道有哪些 C# 库可以让您对一系列操作进行排序吗?每个动作在前一个动作完成后执行,或者更好的是,在特定时间间隔发生后执行。
谢谢。
do you know of any C# libraries that allow you to sequence a series of actions, ie. each action executing when the previous has finished, or better yet, after a specific time interval has occurred.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
查看 http://msdn.microsoft.com/en-us/library/dd537609 .aspx
例子
Look at http://msdn.microsoft.com/en-us/library/dd537609.aspx
Example
对于计时尝试quartz.net。对于同步操作,请使用例如。事件,等待句柄,
Monitor.Wait( )
和Monitor.Pulse()
...否则您可以处理一组操作,例如,
但这只有在您没有主持人方法(顺序处理)时才有意义或者你的方法不应该互相了解。
for timing try quartz.net. for synchronizing actions, use eg. events, waithandles,
Monitor.Wait()
andMonitor.Pulse()
...otherwise you can handle a set of actions, eg
but this only makes sense, if you do not have a moderator-method (sequencial processing) or your methods should not know about each other.
对于计划任务,您正在寻找支持 cron 作业的库。这是我在项目中使用的一个。
http://blog.bobcravens。 com/2009/10/an-event-based-cron-scheduled-job-in-c/
存在很多库。我发现很多功能丰富但有点笨重。
希望这有帮助。
鲍勃
For scheduled tasks you are looking for a library that supports cron jobs. Here is one I used in a project.
http://blog.bobcravens.com/2009/10/an-event-based-cron-scheduled-job-in-c/
A lot of libraries exist. I found many are feature rich and a bit heavy.
Hope this helps.
Bob