Grounding.co.za

Technology information for IT specialists
Welcome to Grounding.co.za Sign in | Join | Help
in Search

Neil's IW Space

Information Worker Blog's by Neil van Wyngaard

July 2008 - Posts

  • Controlling timer jobs in Sharepoint

    One of the most frustrating things in Sharepoint for developers or even administrators, is implementing a new change and then nothing seems to happen. This is caused by the fact that Sharepoint implements almost all changes as jobs that run behind the scenes.

    The only way to speed things up is to firstly understand what jobs are available and then finding a way to change the schedule or execute the job immediately. Unfortunately there is no way to to this in the admin console by default and therefore you will have to use the command line tool "stsadm" to do his. 

    In this blog I will first outline the default jobs that exist, show where you can find this information using the "Sharepoint Admin Console" and then run a command to change the job schedule.

    Default timer jobs

    Default timer jobs for Windows SharePoint Services 3.0

    The following table lists the default timer jobs created for Windows SharePoint Services 3.0.

     

    Timer job title Schedule type
    CEIP Data Collection Daily
    Change Log Daily
    Database Statistics Weekly
    Dead Site Delete Daily
    Disk Quota Warning Daily
    Immediate Alerts Minutes
    Recycle Bin Daily
    Usage Analysis Daily
    Workflow Minutes
    Workflow Auto Cleanup Daily
    Workflow Failover Minutes

    Default timer jobs for Office SharePoint Server 2007

    The following table lists the default timer jobs created for Microsoft Office SharePoint Server 2007.

     

    Timer job title Schedule type
    Application Server Administration Service Timer Job Minutes
    Application Server Timer Job Minutes
    Bulk Workflow Task Processing Daily
    CEIP Data Collection Daily
    Change Log Daily
    Child Farm Content Source Discovery Minutes
    Database Statistics Weekly
    Dead Site Delete Daily
    Disk Quota Warning Daily
    Document Conversions Minutes
    Expiration Policy Daily
    Hold Processing and Reporting Daily
    Immediate Alerts Minutes
    Indexing Schedule Manager on SQL Server Minutes
    Information Management Policy Daily
    Licensing Synchronizer Job Hourly
    My Site Cleanup Job Hourly
    Office SharePoint Server CEIP Data Collection Daily
    Office SharePoint Usage Analytics Log Import Daily
    Office SharePoint Usage Analytics Processing Minutes
    Profile Synchronization Hourly
    Quick Profile Synchronization Minutes
    Records Center Processing Daily
    Recycle Bin Daily
    Scheduled Approval Minutes
    Scheduled Page Review Daily
    Scheduled Unpublish Minutes
    Search and Process Daily
    Shared Services Provider Synchronizing Job Minutes
    Shared Services Timer Job Minutes
    SharePoint Services Search Refresh Minutes
    SharePoint Worker Process Group Update One-Time
    SKU Type Synchronization Job Hourly
    Synchronization Scheduler Minutes
    Usage Analysis Daily
    Variations Propagate Page Job Definition Minutes
    Variations Propagate Site Job Definition Minutes
    Windows SharePoint Services Watson Policy Update One-Time
    Workflow Minutes
    Workflow Auto Cleanup Daily
    Workflow Failover Minutes

    Timer jobs for Office SharePoint Server 2007 with Project Server 2007

    The following table lists the timer jobs that are available for Office SharePoint Server 2007 only, if Microsoft Office Project Server 2007 is installed in the farm.

     

    Timer job title Schedule type
    ProjectPSISharedApplicationTimerJob Minutes

    ServerScheduledTimerJob
    Subtypes:

    • Notifications   Timer job to send scheduled reminders
    • Cubeadmin   Timer job for building cubes
    • Admin   Time job for AdSync (ERP and Group sync)
    • Apply Resource Capacity TimeRange Job
    • Admin   Event Configuration TimerJob
    • Admin   Scheduled Archive/Backup Job
    Minutes
    ProjectServiceCredentialUpdateTimerJob Minutes
    ProjectServiceCheckerTimerJob Minutes

    Shared Services Provider timer jobs

    Shared Services Provider (SSP) timer jobs are timer jobs that are created by default whenever an SSP is created. By default, SSP timer jobs are disabled, and they have to be enabled. These timer jobs are scheduled to run daily, weekly, or at any particular time.

    Default SSP timer jobs

    The following table contains the default timer jobs for any SSP created.

     

    Timer job title Description
    User Profile Full Import Job This timer job imports all data in user profiles.
    User Profile Incremental Import Job This timer job imports only the user profiles that are added since the last import.
    User Profile Change Job This timer job changes the user profile. User rights can be migrated from one user to another user. This timer job is used when a user needs to be migrated, but the previous user profile remains in the Active Directory directory service.
    User Profile Change Cleanup Job This timer job is also used to migrate user rights from one user to another user, but this timer job migrates the user rights and cleans up that user from Active Directory. This is mainly used when the name of a user is changed in Active Directory. The older user name is replaced by new user name and the older one is removed from Active Directory.
    Audience Compilation Job This timer job checks property values in user profile and membership in distribution lists, security groups, and reporting structures to see whether they match the audience rule created. Users that match the audience rules for an audience are included in that audience and the received content is targeted to that audience. A compilation schedule can be set.
    Distribution List Import Job This timer job is used to import the distribution list, so that it can be used among different users.

    SSP timer jobs for Office SharePoint Server 2007 with Project Server 2007

    The following table lists the SSP timer jobs for Office SharePoint Server 2007 only, if Office Project Server 2007 is installed in the farm.

     

    Timer job title Description
    PWASSPSubmitSiteCreationTimerJob This timer job is a one-time timer job used to submit ProjectPSISharedApplicationTimerJob, which is used for provisioning PWA instances, and MUI provisioning.
    PWASSPSubmitServerScheduledTimerJob This timer job is a one-time timer job to submit ServerScheduledTimerJob, which is used by business objects to schedule a task.

     

    Viewing the Jobs using the admin Console

    All the above mentioned jobs can be viewed using the "Admin web site for Sharepoint". Open up the site and navigate to the operations tab.

    Global Config

    On this tab you will find a section called "Global Configuration". There are two options here relating to jobs. The first one is called "Job Definitions" to show you a list of the jobs used by Sharepoint.

    Timer Job Definitions

    The second option is used to view the "Status" of each of these jobs.

    Timer Job Status

    Unfortunately none of these two screens allow you to change anything significant about the jobs except the description. You can also disable the job using this screen. The only way to change anything as far as scheduling goes is to use the command line.

    Edit Timer Job

    You can also view all the jobs from the command line by enumerating through the collection:

    stsadm -o enumssptimerjobs -title "sspname"

    Command Line

    Changing the Job Schedules

    The "stsadm" Administrators command-line application can be used to control certain Timed Jobs functionality. Unfortunately, there are no default commands to install or start/stop Timed Jobs, but there is a command to run all Jobs immediately and commands to reschedule a number of Jobs.

    stsadm -o execadmsvcjobs 

    When you schedule a timed job, you schedule the beginning time for the job. For example, you can schedule a job to be run daily, beginning between 3:00 AM and 5:00 AM. You always schedule jobs to begin within a time range, rather than at a specific time. This allows the SharePoint Timer service to be run at a random time in that range, so that not every server in a server farm is running the scheduled job at the same time. For example, if you set usage analysis processing to be done during the range 1:00 AM to 2:00 AM, then each front-end Web server starts processing usage analysis sometime between 3:00 and 5:00 AM.

    There are also SharePoint components that use a Timed Job and can be controlled using the command-line tool. For example, the commands "setpolicyschedule", "setcontentdeploymentjobschedule", and "setsitedirectoryscanschedule" are components that support the Timed Job infrastructure. Each of the commands accepts a "-schedule" parameter (named "recurrence string" or "schedule" in the help function of stsadm) that is a free string of the form:

    "[Time frame] [Interval] between [value] and [value]"

    For example:

    "every 10 minutes between 0 and 59"
    "hourly between 0 and 59"
    "daily at 21:00:00"
    "weekly between Mon 02:00 and Fri 21:00:00"
    "yearly at Dec 31 22:00:00"

    The syntax looks like this:

    stsadm -o setcontentdeploymentjobschedule -schedule "daily at 21:00:00"

    Referenced Blogs:

    http://technet.microsoft.com/en-us/library/cc678870(TechNet.10).aspx

    http://www.codeguru.com/cpp/misc/misc/microsoftofficeoutlook/print.php/c14133

    Related Blogs:

    Overview of Shared Service Providers in Sharepoint

    Installation Procedure for MOSS

  • Integrating Project Server 2007 and Team Foundation Server 2008 Sharepoint Sites

    Just trying to read the title of this article is quite a mouth full, so I will start by explaining where this idea came from and why I am not using the acronyms as most IT people do.

    I have just recently moved from Johannesburg to Cape Town and joined a very dynamic consulting company that also happens to be a Microsoft Gold Partner (x4). To my surprise (unlike most other MS Partner’s I know) they are actually very high tech and utilize all the Microsoft technologies that they sell.

    My first task as the new “Sharepoint Architect” was to complete their internal MOSS deployment and then upgrade the company from Project Server 2003 to Project Server 2007. After I completed this process I also found that the development team was running Team Foundation Server 2008. This is all good and well, but it created some problems.

    The problem came in the fact that both Project Server 2007 (PS from now on) and Team Foundation Server 2008 (TFS) created their own Sharepoint sites independently. This might not seem like a problem until you try and consolidate all the documentation pertaining to a customer in one single location.

    The solution to the problem is quite logical, but unfortunately not that simple to do. Point both PS and TFS to look at the same Sharepoint Site. This is therefore the topic of discussion in this article and I will demonstrate how to do this.

    The reason I am not starting this article using the acronyms is based on the sad fact that not many companies are using these technologies and therefore the acronyms might seem unfamiliar. This is due to a number of reasons such as cost, new tech and complexity, but this is not something I am going to debate at this point.

    I have recently been approached by "Arno Nel" to write a new Sharepoint article for the launch of a new web site called "Sharepoint Magazine". The rest of this article can therefore be found by following the link below:

    http://sharepointmagazine.net/technical/administration/integrating-project-server-2007-and-team-foundation-server-2008-sharepoint-sites

    If you wish to place comments, you can either do it on this site or on "Sharepoint Magazine".

    I hope you enjoy the article!

  • Getting "Debug Info" for a Sharepoint error!

    Some time ago I had the bright idea of moving the SQL databases for Sharepoint. I was running a VPC with only one virtual drive and started running out of disk space. So I decided to create another virtual drive, detach the SQL databases from SQL Server, copy them to the new drive, mount the databases and test the Sharepoint configuration.

    Everything should have worked perfectly, wrong! In theory Sharepoint should only be looking at the logical names of the databases, but it seems that I was mistaken. Most of the functionality in Sharepoint worked perfectly expect for "MySite". When I selected the link at the top of the Sharepoint site.

    MySite Link

    I got the following error.

    File Not Found

    As you can see it is completely descriptive and tells you exactly what to do to fix the error, NOT!!!!

    So, now what! Without some more information to go on, it becomes a bit difficult to resolve the error and as we all know the "Event Log" only goes so far.

    Fortunately Sharepoint has been built using the .NET framework and we can use that to get some more info. To do this, we need to go and change some settings in the web.config file that sits in the root of the web site in IIS. Even tough Sharepoint stores most of its information in the SQL Server content database, it still needs the .NET framework to process this information.

    To find the web config file, we need to navigate to the "Inetpub" directory using windows explorer.

    Folder Structure

    Under the "Inetpub -> wwwroot -> wss -> Virtualdirectories" folder, you will find sub folders representing each of the web applications used by Sharepoint including the system web applications. Each of these have their own web.config file.

    Edit Web Config

    Find the correct folder representing the web application causing the problem and edit the web.config file using your preferred text editor. I like using "Notepad" as it is "Light Weight" and does not have all the "Bells" and Whistles" I do not need.

    There are two section that we need to modify in this file. The first section involves the "Call Stack" of the .NET framework. This will give us a list of all the assemblies involved in the error. This can be done by setting the "CallStack=True" flag.

    Callstack True

    The second thing that we need to do is switch the "customErrors mode=Off" so that the information will actually be displayed on the screen.

    Custom Error Off

    Once these options have been configured and the web.config file saved. We can then re-simulate the error and see what you get back.

    Complete Error

    As you can see, we now get a lot more information back that can potentially be used to help resolve the error. I did not say the information will be useful, I only said that you will have more of it.

    Remember to change the web.config back to it's original state after you have resolved the error. This information should not be available publicly on the intra or Internet as this could be a potential security risk.

    Related Blogs:

    ASP.NET error registering with IIS

    Overview of the .NET Platform

    .NET 2.0 Framework

    Posted Jul 04 2008, 01:26 PM by Neil with 5 comment(s)
    Filed under: ,
More Posts
Add to Technorati Favorites
Powered by Community Server (Commercial Edition), by Telligent Systems
Afrigator