kjv
kjv

Reputation: 11327

How to use SPWindowsService

From what I understand from the sparse documentation on MSDN, the way to do long running jobs in SharePoint is to use a SPWindowsService. I would like an example on how to create a custom windows service to run in the context of a SharePoint farm.

Upvotes: 3

Views: 490

Answers (2)

Thomas
Thomas

Reputation: 1

The following MSDN article should give enough information about how to integrate Windows Services with SharePoint and use the SPWindowsService class.

http://msdn.microsoft.com/en-us/magazine/dd569748.aspx

Upvotes: 0

Doug Perkes
Doug Perkes

Reputation: 135

Instead of SPWindowsService you should create a custom SharePoint Timer Job that executes periodically or once. There are quite a few examples out there on the web, but start with Andrew Connell's examples and go from there:

MSDN Visual How To: Creating, Deploying, and Debugging Custom Timer Jobs in Windows SharePoint Services 3.0 Learn how to harness the power of custom timer jobs in Windows SharePoint Services 3.0. http://msdn2.microsoft.com/en-us/library/cc427068.aspx

Upvotes: 0

Related Questions