views:

119

answers:

2

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).

+2  A: 

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

gooch
This is what I use since it takes care of the scheduling for you.
David
Thanks for the suggestion.
mare
qstarin
A: 

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).

qstarin
thanks for the references to Quartz.Net and SmartThreadPool. This was something that I was looking for.
mare