Question

I have weird problem with my custom timer job...

My timer job rans perfectly and shows succeeded in tmr status page BUT no changes don`t appear in these site collections.

I have heavily logged timer jobs steps... no errors there and log files show that it rans perfectly as possible...

Server environment is: MOSS 1x App 2x WFE 1xSQL

Timer Job purpose: Custom Timer job checks 4 sitecollections lists items (workflow items) are they expired. Checks list items and and then calls webservice if a item is expired...

Contructor code from timer job:

    /// <summary>
    /// Initializes a new instance of the TimerJob class.
    /// </summary>
    /// <param name="jobName">Name of the job.</param>
    /// <param name="webApplication">The web application.</param>
    public TimerJob(string jobName, SPWebApplication webApplication)
        : base(jobName, webApplication, null, SPJobLockType.Job)
    {
        Title = "WorkflowChecker";
    }

Does SPJobLockType.Job affect this? I seriously dont know why timer job does what it does...

Thx in advance... SAV

Was it helpful?

Solution

A timer job runs in a specific Windows service for SharePoint Server. Timer jobs also perform infrastructure tasks for the Timer service, such as clearing the timer job history and recycling the Timer service; and tasks for Web applications, such as sending e-mail alerts. A timer job contains a definition of the service to run and specifies how frequently the service is started. The SharePoint 2010 Timer service (SPTimerv4) runs timer jobs. Many features in SharePoint Server rely on timer jobs to run services according to a schedule.

There are three different types of locking, as defined by the SPJobLockType enumeration:

  • SPJobLockType.ContentDatabase Locks the content database. A timer job runs one time
    for each content database that is associated with the Web application.
  • SPJobLockType.Job Locks the timer job so that it runs on only one machine in the farm.
  • SPJobLockType.None No locks. The timer job runs on every machine on which the parent
    service is provisioned.

You can view the following site and will get clear pic what,why and how.. http://www.andrewconnell.com/blog/articles/CreatingCustomSharePointTimerJobs.aspx

Regards,
Shiva

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top