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.
A:
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
Doug Perkes
2009-10-08 16:17:14
I am aware of SharePoint Timer Jobs, but I do not wish to use them, as I have already specified in a reply to a comment to my question. I have good reasons why I wish to use a fully custom service.
iulianchira
2009-10-10 10:03:48