Sharepoint 2010 TimerJob重复

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

  

SPJobLockType 枚举 (Microsoft.SharePoint.Administration)

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

 成员名称说明
  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属性值。

posted @ 2013-09-10 12:17  晴朗星空2012  阅读(221)  评论(0编辑  收藏  举报