SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a number of custom jobs that my program adds to my SharePoint environment. I noticed that there is no option to give the job a particular ID/GUID in the constructor. So my question is: How is new job's GUID/ID assigned when created and submitted?

I'm aware that I can access and modify that member of the SPJobDefinition, but I'm curious how it's set otherwise.

share|improve this question

When the instance of job definition is created it ID property is initialized via base SPPersistedObject constructor to Guid.NewGuid() :

protected SPPersistedObject(string name, SPPersistedObject parent)
  : this(name, parent, Guid.NewGuid())
share|improve this answer

Your Answer


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.