Saturday, September 20, 2014

Custom Timer Job Adding new items for the custom list on the schedule time

Hi there,

I worked on the small requirement to add the items for a custom list with predefined schedule.

Here we used the base class SPJobDefinition which is part of SharePoint, Administration namespace.
So we need to make sure to add the reference Microsoft.SharePoint.Administration reference and the namespace as well.

our custom timer job class needs to inherit the base class SPJobDefinition and then it has to override the method Execute().

Here is the sample code we have to write for our business logic and then associate this class with feature receiver.



Regarding the feature scope, since this job runs under the central administration, we need to activate this feature at the web application level for which our custom list is getting updated





No comments: