Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 334483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:03:30+00:00 2026-05-12T10:03:30+00:00

I am trying to create a timer job in WSS 3.0. My timer job

  • 0

I am trying to create a timer job in WSS 3.0. My timer job would create the object of SPsite then SPWeb and then SPDocumentLibrary (or possibly picture library)using their GUIDs stored in any xml or database.After that it would take the back up of documents in the document library in some third party application and then delete those documents.

So my question is: what should be my SPJobLockType ‘None’ or ‘Job’ or ‘ContentDatabase’ ideally?? Following is my understanding after reading some articles on timer job. Please correct me if I am wrong at any place as I am quite new to SharePoint

  1. If i use ‘None’, then my job would run on each server in the farm. Do I really need that? because my job is only modifying /deleting documents(I am modifing only content database through my timer job. Please correct me if I am wrong).

  2. If I use lock type ‘Job’ , then my job would run only on the server on which job creation code is executed.But it can fulfil my requirement(I think so but i am not sure please correct me if am wrong ).

  3. I have gone through this article for ContentDatabase LockType..It says

in short, it’s almost the same as the
Job one, meaning that it only runs one
server.. BUT.. as Peter find out at
Help needed with custom timerjob in
SharePoint 2007 , the job runs for
each ContentDatabase that the
WebApplication is associated with.
Another (quite annoying) fact is that
it is not that predictable when it
will run on the next content database.

Please give your thoughts/Suggestions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:03:30+00:00Added an answer on May 12, 2026 at 10:03 am

    Anoop,

    The “sweep” type of timer job you’re describing is a fairly common one, and I’ve written a number of them myself for different projects. In this type of timer job, you’re processing a set of sites, webs, or lists to perform some sort of maintenance. It’s typically easiest to process one site/web/list at a time, and the task being performed isn’t the type that needs to be performed with maximum speed (that is, something that would require a concurrent/multi-threaded processing model to complete quickly).

    In this type of scenario, I’ve generally built my timer jobs to use an SPJobLockType of “Job.” As you noted, this ensures that only one instance of the timer job is running at any given time within the farm. This avoids collisions that would occur if multiple instances ran with an SPJobLockType of “None,” and it also avoids the confusing (at least I find it confusing) mechanism of operation that is associated with an SPJobLockType of “ContentDatabase.”

    Here’s a link to the timer job I wrote and posted out on CodePlex. It performs the same type of sweep (at a slightly higher-level) that you were describing: http://blobcachefarmflush.codeplex.com/SourceControl/changeset/view/53851#797787. An instance of the timer job is created in a FeatureReceiver with the following line of code:

    BlobCacheFarmFlushTimerJob newJob = new BlobCacheFarmFlushTimerJob(jobName, housingWebApp, null, SPJobLockType.Job);
    

    Based on my understanding of what you’ve written, I believe an SPJobLockType of “Job” would be appropriate. You want to ensure that only one instance of your job is running at a time (to prevent two or more instances of the same job from trying to process the same SPSite).

    I hope that helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 236k
  • Answers 236k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Currently the Turbine bits don't allow for lifetime management since… May 13, 2026 at 6:20 am
  • Editorial Team
    Editorial Team added an answer It looks like you're trying to add a watermark on… May 13, 2026 at 6:20 am
  • Editorial Team
    Editorial Team added an answer Can it be an empty tooltip? Is the getTooltip() method… May 13, 2026 at 6:20 am

Related Questions

I have created a site collection inside a web application with user A as
I'm developing a timesheet application using SQL Server as my backend and I am
As Anton points out (thanks Anton!) my problem is Association Caching in the tests
I am trying to copy an SPListItem (with file) from one site collection to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.