Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question
    
What are you expecting to happen that isn't happening? –  CodeThug Nov 22 '10 at 11:49
add comment

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer
    
I know those things already.. but what is the cause that timer jobs results are not appearing in site collection... –  SAV Nov 22 '10 at 10:16
    
Have you tried restarting the timer service? –  Vivek Nov 22 '10 at 16:35
    
Ofcource. I ended up restarting hole farm and timer job worked after that... –  SAV Dec 4 '10 at 15:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.