How to create a SharePoint Timer Job

Reading Time: 2 minutes

In my first article I want to talk of the SharePoint Timer Job.
The timer job is a very useful service on SharePoint, that allow automate a process, for example.
For developing a timer job is necessary create a class in the follow method:     public class NotificationTimerJob : SPJobDefinition {}.
There is a good example on MSDN that help us to understand better, how to develop a timer job for SharePoint 2010: http://msdn.microsoft.com/en-us/library/ff798313.aspx
When I go to debug is absolutely important on visual studio to do “attach process” as in figure:

and choose OWSTIMER.exe :

Now is possible run the timer job from the central admin and to go into debug on your code. One more thing very important is to restart the SharePoint timer service:

This last step allow to process your last changing at the code. For now that’s all, follow me in the next article.