SPJobDefinition Class (Microsoft.SharePoint.Administration)
SPJobDefinition Class (Microsoft.SharePoint.Administration)
Represents a job definition.

Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Syntax

'Usage

Dim instance As SPJobDefinition


'Declaration

<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
Public Class SPJobDefinition
    Inherits SPPersistedObject
Remarks

Job definitions must be associated with a service or web application. Use the Service or WebApplication properties to return the SPService or SPWebApplication object with which this job definition is associated.

A job definition can also be associated with a specific server. Use the Server property to return the SPServer object with which this job definition is associated.

Use the JobDefinitions property of the SPService or SPWebApplication object to get the collection of job definitions for the given object.

Inheritance Hierarchy

System.Object
   Microsoft.SharePoint.Administration.SPAutoSerializingObject
     Microsoft.SharePoint.Administration.SPPersistedObject
      Microsoft.SharePoint.Administration.SPJobDefinition
         Microsoft.SharePoint.Administration.SPAdministrationServiceJobDefinition
         Microsoft.SharePoint.Administration.SPUpgradeJobDefinition
         Microsoft.SharePoint.Administration.SPWorkItemJobDefinition
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also

Community Content

More info from Andrew Connell, et al
Added by:Oskar Austegard
A good set of references:
  • Creating Custom Timer Jobs in Windows SharePoint Services 3.0
  • Creating, Deploying, and Debugging Custom Timer Jobs in Windows SharePoint Services 3.0 (Video)
  • Best Practices: Moving SharePoint Timer Jobs logic to Webservices
  • Reading web.config from a Timer Job
  • SharePoint Timer Job Administration (CodePlex project)
  • Visual Studio 2005 Project Template based on Andrew Connells article
    Added by:Rafik FAreh

    Alexander Brütt published a visual studio 2005 project template on Tobi's Blog to create and deploy timer jobs

    http://saftsack.fs.uni-bayreuth.de/~dun3/archives/visual-studio-2005-project-template-for-sharepoint-2007-timer-jobs/142.html

    © 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
    Page view tracker
    Rate the Lightweight library
    x
    Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
    Do you like the SearchBox?
    Do you like the tabbed code blocks?
    How useful is this topic?
    Tell us more.
    Thanks
    x
    You're helping to improve MSDN Online.
    Feedback
    Switch View
    Classic
    Lightweight Beta
    ScriptFree
    Switch View