SharePoint Experts, Information Architects, Expert Witness

SICG provides a broad array of business and technology consulting from architecture to design to deployment of global systems with a focus on surfacing data in the enterprise. We focus on the "How", not just the possible. Contact me direct: david_sterling@sterling-consulting.com or call 704-873-8846 x704.

Search This Blog

Sunday, March 2, 2008

Alerts (Immediate and Workflow) not working in WSS/MOSS

You may have an issue in which SharePoint Alerts are not being sent, though you receive an alert when it is created.

The primary issue centered around the Timer Service and a few jobs that must be running for alerts to work. A few things to check for first:

1) Verify the Timer service is running and that it's identity (running as) is the SharePoint Service account (Start > Control Panel > Administrative Tools > Services). Locate the SharePoint Timer service in the list and see if it is running. If not, right click on it and start it. If it stops again, the user is likely incorrect. Right click on it and select Properties then on the Identity tab, verify the account in use (Local Service or similar is NOT correct); set this to be the SharePoint Service account, close out the properties and try to start it again. If it stops again, you will have to go to the Domain Policies and make sure that the service account has "Run as a Service".

2) Verify the necessary jobs exist (SharePoint 3.0 Central Administration > Operations > Timer Job Definitions):
Immediate Alerts
Workflow
Workflow Auto Cleanup
Workflow Failover

If they do exist, check the Timer Job Status (SharePoint 3.0 Central Administration > Operations > Timer Job Status) and see if any of these are displaying errors (you should also check the System Application Event Log).

If the jobs do not exist, you may be in for some work depending on the installation. If the site was a restore, you may have created an issue Microsoft has identified - you can see this solution here:
http://support.microsoft.com/kb/942989

However, as I discovered with one of my clients, a site that had been migrated (not the situation explained in the link above) was missing these jobs. After much investigation, I was able to simply add the jobs as follows:

Login to the server, get down to the command line and set your directory to be the SharePoint bin folder (usually c:\program files\common files\microsoft shared\web server extensions\12\bin). Verify the STSADM.exe file (the SharePoint command line utility) is there to make sure you are in the right folder.

Add the jobs to the site experiencing the problem by adding the jobs manually as so (Note: you should ONLY do this for the job(s) missing).

First you can verify whether the job already exists by using the command:

stsadm -o getproperty -propertyname job-immediate-alerts -url http://yoursite:port

If the job does not exist, you will recieve a message:

Property Exist="No"

If the job does exist, you will see a different message, such as:

Property Exist="Yes" Value="every 5 minutes between 0 and 59"

(In both cases, the message preceeded by a left arrow and closed with a slash-right arrow; this blog will not permit me to enter the exact syntax as it interprets it as HTML).

Verify this for all the job types:

Job Type: Property Name:
Immediate Alerts job-immediate-alerts

Workflow job-workflow

Workflow Auto Cleanup job-workflow-autoclean

Workflow Failover job-workflow-failover

To add the individual jobs:

Immediate alerts:

stsadm -o setproperty -propertyname job-immediate-alerts -url http://yoursite:port -propertyvalue "every 5 minutes between 0 and 59"

Workflow:

stsadm -o setproperty -propertyname job-workflow -url http://yoursite:port -propertyvalue "every 5 minutes between 0 and 59"

Workflow Auto Clean:
stsadm -o setproperty -propertyname job-workflow-autoclean -url http://yoursite:port -propertyvalue "daily between 22:00:00 and 06:00:00"
Workflow Failover:
stsadm -o setproperty -propertyname job-workflow-failover -url http://yoursite:port -propertyvalue "every 15 minutes between 0 and 59"


Use the Get Property command to verify that the jobs are created. Note that the URL MUST BE SPECIFIED AND CORRECT or you will simply receive 'Property Exist="No"'.

Hope this helps! Sure beat trying to follow the Microsoft solution (which may or may not have corrected the problem).

No comments: