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
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
You can either run this job manually or using powershell to get the job executed quickly.
ASKER
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.Power Shell
$myJob = Get-SPTimerJob "job-email-delivery"
While ($True)
{
Start-Sleep -Second 5
$myJob.RunNow()
"Started job-email-delivery."
}
Thanks!
I wrote this script, which seems to work fine:
Add-PSSnapin Microsoft.SharePoint.Power
$myJob = Get-SPTimerJob "job-email-delivery"
While ($True)
{
Start-Sleep -Second 5
$myJob.RunNow()
"Started job-email-delivery."
}
Thanks!
SPAlert properties
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spalert_properties.aspx