Sharepoint 2010 TimerJob重复

  昨天被TimerJob困扰了一天。缘由就是TimerJob当中会有一个Httpwebrequest GET请求一个Application Page进行一些操做(其中有一个操做是发送邮件)。可是发现随机性的Httpwebrequest会重复请求Application Page。起初觉得是SMTP的问题,排除不是!Httpwebrequest重复发送,排除不是!只多是TimerJob执行了两次,结果问题就出在TimerJob SPJobLockType属性。web

  

SPJobLockType 枚举 (Microsoft.SharePoint.Administration)it

Values for the lock type of a job definition.
命名空间: Microsoft.SharePoint.Administration
程序集: Microsoft.SharePoint (在 microsoft.sharepoint.dll 中)io

  成员名称 说明
  ContentDatabase Locks the content database before processing. 
  Job Locks the job to prevent it from running on more than one machine. 
  None No locks 

 

若是出现TimerJob重复的状况,能够试下修改SPJobLockType属性值。event

相关文章
相关标签/搜索