Link to home
Start Free TrialLog in
Avatar of gunman69
gunman69

asked on

Making OWSTimer run more frequent

We are implementing a SharePoint event receiver, attached to an email enabled announcement list.

The OWSTimer job (which is the module which "moves" the incoming emails from the SMTP server to the announcement list) runs approx once a minute.

Thus, in average, we have to wait 30 sec before an email that we send appears in the announcement list. This makes debugging our solution awkward and time consuming.

So, as the title says: Is there anyway to have the OWSTimer job do its job more frequent?

/Fredrik
Avatar of Yagya Shree
Yagya Shree
Flag of India image

Use this to change your alert firing time

SPAlert properties
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spalert_properties.aspx
Avatar of gunman69
gunman69

ASKER

I don't think you read my question. We are receiving emails, through a mail-enabled list. SPAlert is for sending alerts, something very different.
ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
the timer job responsible to process your incoming email and sending it to list is "Timer Job job-email-delivery"

You can either run this job manually or using powershell to get the job executed quickly.
Although I was hoping for a way to configure the job to run more frequent, this would work ok.

I wrote this script, which seems to work fine:

Add-PSSnapin Microsoft.SharePoint.PowerShell

$myJob = Get-SPTimerJob "job-email-delivery"

While ($True)
{
      Start-Sleep -Second 5
      $myJob.RunNow()
      "Started job-email-delivery."
}


Thanks!