.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Problem in Sharepoint Custom Timer job

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :SharePoint

I have created one timer job using the steps metioned in this link http://msdn.microsoft.com/en-us/library/cc406686.aspx ".
This job is working fine. But i want to modify this timer job. so that i can update Tasks list column after some time interval.

I added my custom logic in the Execute method, but it is not working. In my custom logic i am getting list items of Tasks List and i am updating it.

Does anyone know where is the problem?

Also if you have any other examples of timer job. That would be greatful.

Thanks in advance.

View Complete Post

More Related Resource Links

Problem with SharePoint Designer 2007 and Custom List Forms


I created several forms (Create/Edit/View) for a SharePoint list, using Custom List Forms.  I'm using Content Types in the list to ensure that each item only has the necessary fields.  When I created the ASPX forms, and inserted the Custom List Forms, I selected the correct Content Type, and I got the right fields inserted in the form.

Now, for some reason I can't identify, every time I create a new form, and insert a Custom List Form, SPD is bringing ALL fields from the list, instead of just bringing the fields included in the selected Content Type.

I have tried many different things to solve the problem, including creating new lists/content types/forms, etc. but SPD is doing the same thing all the time.

Can somebody tell me what may have gone wrong in SPD or MOSS?


Custom SharePoint Timer Job doesn't run after changing code and restart timer services.

Hi We are facing an issue that our custom SharePonit Timer Job doesn't run after a changing the code. First, we developed and deployed a timer job. It worked fine for a few days, then we detected a memory leak and killed the OWSTIMER.EXE. (Maybe we should uninstall the timer job and restart the timer services nicely). We fixed the problem, redeployed the fix as a feature (assemblies are re-GACed ...) to our small SharePoint farm (one web server, one services server), restarted the SharePonit Timer Services. Now we can see the time job in Timer Job Definition in Central Admin but the job never runs (Since it doesn't run, the timer job status page doesn't have any info about it). We tried the same process in a dev environment with SharePoint signle box installation. The timer job just works fine. I did some search on Internet and followed some instruction to clear the cache from "C:\ProgramData\Microsoft\SharePoint\Config\1d50d73c-9bf1-4444-85a9-910ed050d1bf" by 1. Remove all the xml2. Clear the cache.ini with "1".3. restart the timer services. It still doesn't fix the problem.Please advise what else I can do. I even rename the timer job and redeploy it. It doesn't help. I checked the even log and SharePoing log and couldn't see anything wrong. Our OS is W2K8.         public override void FeatureActivated(SPFeatureReceiverProperties properties)        { 

Custom Web Part Problem After SharePoint Restore

Hi, I've recently moved our sharepoint site and databases (using Microsoft Internal Database) to another standalone server. I did a catastrophic backup and then restored it on the destination server successfully via the central Administration page. I have also copied our custom web part library dll to 'c:\windows\assembly' directory and 'C:\Inetpub\wwwroot\wss\VirtualDirectories\80\bin' directory. I also copied over the old web.config file to 'C:\Inetpub\wwwroot\wss\VirtualDirectories\80'. However, I still seem to be missing something as I get the error below while loading the site. I haven't been able to find a solution so hoping someone has seen it before here. Has anyone seen this happen before? Any advice/help would be greatly appreciated. Many thanks. Mehds ERROR====================================================================================================== The “webpartname” web part appears to be causing a problem. Object reference not set to an instance of an object.  Web parts maintenance page: if you have permission, you can use this page to temporarily close web parts or remove personal settings. For more information, contact you site administrator. ==========================================================================================================

custom timer job Access denied sharepoint 2010

Hi, I have a question regarding to custom timer job will be happy if you could help us. The problem is that - owstimer.exe running the timer job crashes. - Question why? Launch debugg in the feature - running the timer job is falling on taskJob.Update (); writes SecurityException  I developed the Job TIMER on moss2007 that everything worked, Now we turned from 2007 to sharepoint 2010 and Job TIMER does not work. I tried to note all of the code is inside the function Execute in  job timer might have something to code blocks. But it also did not help. Eventvwr he writes in the following error: The description for Event ID 0 from source Application can not be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: Custom Timer Jobs: func FeatureActivated Access denied. the message resource is present but the message is not found in the string / message table what the solution to that-timer job that will work? Thank you Moshes

Problem with Update of Sharepoint Taxonomy Fields in custom developed Content Types

Dear all, we developed an solution on sharepoint 2010 for one of our customers with custom lists and content types with fields from the managed meta data store. As recommended we developed everything in features & solutions so that easy deployment is possible. Adding metadata to the termstore seems to work without problems, but today we stepped over an confusing issue: Our customer changed the default label of an term in the metadata term store, but the label did not change in listviews and detailviews of items in the specific sitecollection. In editview we see the correct label. After searching a while we discovered the connection between the sitecollection and the term store, the hidden Taxonomylist (/Lists/TaxonomyHiddenList/AllItems.aspx) in the sitecollection, which seems to map the terms. After testing we discovered that the term/label did also not change in the hidden taxonomy list. The Timerjob “Taxonomy Update Scheduler“ is running hourly with success and we also tried to start the job manually, but the label did not change in the hidden list. Also there are no errors in the logfiles in verbose mode. We also tested to create a managed metadata field manually, put it in a list and after that, changed the label. For whatever reason the update of labels on manually created fields works without a problem. Our lists, content types etc get created pr

Problem while creating task with custom content type in sharepoint workflow


Hi all,

I am trying to create task with custom content type in sharepoint statemachine workflow. But it is showing "Error Occured" after task creation code is excecuted. can anyone tell me what is the problem.

Task Content type


  <ContentType  ID="0x01080100A707C0079E8547c0A87515457DB90629"
      Description="Workflow Task"
      <FieldRef ID="{9da97a8a-1da5-4a77-98d3-4bc10456e700}" Name="MyComments" DisplayName="MyComments"  />
      <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
        <FormUrls xmlns="

Problem validating StringBuilder fields in SharePoint 2010 Custom Workflow Validators


One of our custom SharePoint Designer workflow activities, which have always worked fine in SharePoint 2007, fails to validate.

This appears to happen when a Workflow Activity that contains a StringBuilder field also contains a lookup variable.

<FieldBind Field="CustomCode" Text="this code" Id="1" DesignerType="StringBuilder" />

For example when we store the following in this StringBuilder field

"Today's date = [%Current Item:Transaction Date%]"

This field returns 'null' in the ActivityValidator. As a result we cannot validate its contents.


Problem with creating Custom List in SharePoint Designer


Hello all,

I have used SharePoint designer 2007 to create a custom list for my SharePoint 2003 portal.  The list is quite simple, without any extensive programming. 

First I created a 'shell' for my list inside of SharePoint, where I name my fields and select their input types (Choice, Date, Currency, etc).

I then create a new .aspx file, insert a Custom SharePoint List into the new file, and use the above mentioned 'shell' to insert my content.

From this point, I rearrange the design, insert a few basic JavasScript elements - for image rollovers - and save.

The page displays perfectly in my live SharePoint environment.  However, when I enter data into this form, and submit, it doesn't save the data correctly.  For instance, there's a Yes/No option near the end of the form, defaulted to No.  If I click that checkbox - to set it to Yes - and submit the form, the resulting record does not show that I had clicked the checkbox.  In fact, it shows the whole form as being blank, as if I had entered nothing at all.

If this makes sense, how would I go about fixing this?

Problem With SharePoint Timer job - Ignoring basic c# functions.


Hi there guys..I am having a really annoying problem with my timer job. 

What does my timer job do?

Essentially it looks into a SharePoint list to automatically send emails for people who have booked onto seminars three days and one day before the seminar.  What im having problems with is constructing a CAML query.  I have the value of a sharepoint lookup column (e.g. 3;#3) and i am trying to extract the ID from this field using:

int index = string.indexof(";#");

newstring = string.substring(string,index);

This obviously will work no problems however when i debug my code in the timerjob  it only returns null.  When i type the code into the immediate window during debugging it returns me the right value.


Does anyone know a reason why it would not properly process the standard c# code?  Below for reference is my entire code.


Thank you in advance



  public class SeminarTimerJob : SPJobDefinition
    public SeminarTimerJob()

      : base()


    public SeminarTimerJob(string jobName, SPService service, SPServer server, SPJobLockType targetType)

      : base(jobName, service, server, targetType)


    public SeminarTimerJob(string jobName, SPWebApplication webApplication)

      : ba

problem using custom membership provider in sharepoint 2010, please help!



My company developed a custom membership provider using .net framework 4 which causes the problem. As you know, all web application in sharepoint 2010 is running on .NET framework 2, so when a web application is configured to use our .net 4 custom membership provider, .NET CLR version 2 is loaded to run the web application but our membership provider assembly binds to .NET CLR version 4. So it is not surprising to see the following exception:

Could not load file or assembly '[our membership provider assembly]' or one of its dependencies.This assembly is built by a runtime newer than the currently loaded runtime andcannot be loaded.

Logically, there are two ways to solve this problem, but neither of these ways actually works.

1. Change the application pool under which the web application runs to use .NET 4 rather .NET 2. But this causes a lot of web.config exceptions. I don't quit understand those config exceptions because in asp.net it's framework backwards compatible.

2. Redirect our membership provider assembly to be executed under .net framework 2. But this way also doesn't work because if our membership provider assembly uses some classes available only in .net framework 4, that part of code has no way to be executed.

Can you give

Custom Sharepoint 2007 Timer Job - Object Reference Not set to an instance



I am creating a Custom Sharpeoint timer job (in 2007) and i used Andrew Connel's blog and his code to create it. But for some reason I always get this error. I commeted out all my code inside execute method but still its the same. I am deploying my timer using Solution Package installation and activated the Feature.

Here is the error: The Execute method of job definition CustomSPJobDefinition.CustomSPService (ID 88a735f1-bbb7-4fea-932f-690dfc25a212) threw an exception. More information is included below.

Object reference not set to an instance of an object.



Guid targetInstanceId = new Guid("EAC61BD1-0C2A-45F6-9148-3A8BC9C93339"

Problem with adding third party webparts and sharepoint webparts to the custom pages


Hi All,


 I have a problem with my custom webpart pages which are inside sitedefinition. I have a sitedefinition defined for creating sites and sitedefinition contains the master pages and .aspx pages. My pages have webpartzone defined to with the custom webparts added in it. From the browser, when I try to add third party webparts or sharepoint webparts or my custom webparts, it's failing with "Unable to add selected web part(s). The operation could not be completed because the Web Part was deleted by another user or is invalid." Does anyone have the same problem? Please help me. Why the pages are not allowing to add any other webparts to the page. Also I double checked my pages and webpartzones if I am blocking to add webparts via AllowCustomizations=false but I am not. If I create a site with the sitedefinition, isn't it possible to add webparts to the page manually? I haven't found any information about this. Any ideas please.


Thanks in advance,


Write Custom WebParts for SharePoint 2007

The popularity of SharePoint Portal Server 2003 led Microsoft to tightly integrate the next SharePoint version, Microsoft Office SharePoint Server (MOSS) 2007, with its ASP.NET 2.0 WebPart framework. This tight integration enables the ASP.NET and SharePoint developer to do a number of things that previously weren't possible

Writing Custom Web Parts for SharePoint 2007

As I mentioned in an earlier blog post, SharePoint 2007 is built on top of ASP.NET 2.0, which means you can now use ASP.NET 2.0 features (Forms Authentication, Master Pages, Membership, Site Navigation, New Data Controls, etc) when building SharePoint sites. This is true for both the new Windows SharePoint Services 3.0 version (which will be a free download) as well as Microsoft Office SharePoint Server 2007 (which costs money).

Office Space: Custom Field Types for SharePoint 2007


Custom field types provide a powerful way to define a reusable SharePoint column definitions.

Ted Pattison

MSDN Magazine May 2009

Office Space: Custom Auditing In SharePoint


Learn how to enable an auditing solution for Windows SharePoint Services (WSS) 3.0 with customized control pages in Microsoft Office SharePoint Server (MOSS) 2007.

Ted Pattison

MSDN Magazine September 2008

How to add custom list entries to mysite's calendar in Sharepoint 2007 site?


I would like to know below things

(1) How to create MySite for one specific member with other or administrator's access?

(2) Scenario : Administrator have created one SP2007 site. now Administrator have created one calendar (Sample calendar). Administrator have added some entries in calendar. now one user entered in portal site ansd view the calendar and he click on MySite menu. so this sample calendar entries should enter in that user's mysite calendar. How this can be achieved?

Thanks in advance.
Regards, Praful Udade
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend