开发者

what to use for repetitive (daily, weekly, monthly) tasks ? Workflows, Windows Services, something else?

I've been writing Windows Services for a while and they always seem to work fine for things that开发者_开发问答 need to run every day, few times a week, once a month, etc. but I've been lately thinking about going with Windows Workflow Foundation.

However, I am unsure how would they run on a server without some container application (for instance SharePoint)? I worked with Sharepoint workflows before and I always had huge problems, at first with the bugs in the workflow architecture implementation (the problems with sleep and delay) and later when they eventually started to work, they were difficult to manage and change.

On the other hand Windows Services were always quite easy to implement, easy to create a setup for them and install them and they were always quite resilient (they were often working for months without crashing or something else going wrong).

What do you recommend? Please bear in mind we are working in .NET (version is of no problem, if 4.0 brings something new on this subject, we can use it).


Have you looked into Windows Scheduled Tasks? It is not new, but it allows you to build an application that can be run at specific dates/times. The scheduler provides a lot of customization similar to windows services. MSDN Article


We often choose to use a Windows Service. For recurring and scheduled tasks, we utilize the Quartz.Net library. When those tasks are lengthy blocking operations, we also incorporate the SmartThreadPool library. We let Quartz create a job and stick it in the SmartThreadPool for execution (because we encountered misfiring trigger issues with long-running jobs in Quartz, and also because we sometimes want to separate different types of jobs into different thread pools for execution).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜