Quick Tips on SP Background Timer Jobs

At one point in your development career, you may find yourself face to face with Timer Jobs for your server. Timer Jobs debugging can be tricky sometimes, but here are some tips that can help you identify issues with your C# code.

One problem that you’ll find is that it seems like your old code is still running no matter how many times you deploy/retract your current code.

Cached Assemblies!

Any time you update your custom timer job class and deploy the assembly to the global assembly cache, you must restart all the timer services in the farm. If you don’t restart the timer service, it will run the old copy of your timer job class. Yes, the timer service caches the assemblies. Restarting the SharePoint timer service is the only way to refresh the assembly cache and force it to use your updated assembly. You can achieve that from the Powershell Command line using the following commands:
net stop sptimerv3 

net start sptimerv3

Reference: http://www.codeproject.com/Articles/70866/Debugging-Custom-SharePoint-Timer-Jobs

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.