简体   繁体   English

SharePoint 2007计时器作业

[英]SharePoint 2007 timer job

I have developed custom timer job in SharePoint 2007. Issue i get , is that timer job executes properly few times, after that it stops working and if i check the status of the job it stuck on "Initialized" mode. 我已经在SharePoint 2007中开发了自定义计时器作业。问题我得到的是,计时器作业可以正确执行几次,此后它将停止工作,并且如果我检查卡在“初始化”模式下的作业的状态。 If i remove and add job definition it will start working again few times with "Succeeded" status, after which again the same issue. 如果我删除并添加工作定义,它将以“成功”状态再次开始工作几次,此后再次出现相同的问题。

Any ideas? 有任何想法吗?

Hrayr 哈雷

It might be that you are developing the Customized Content Deployment job for Export and Import of the Contents between different Web applications. 可能是您正在开发自定义内容部署作业,以在不同Web应用程序之间导出和导入内容。 So, it could be export is not performed properly or perhaps export failed during the job execution. 因此,可能是导出未正确执行,或者在作业执行期间导出失败。 There also might be dependency between different jobs. 不同作业之间也可能存在依赖关系。

I would recommend you to take following actions: 我建议您采取以下措施:

If you are working with Import and Export Timer jobs, then try to increase the span of Export timer job from 5mins to 10 mins. 如果要使用“导入和导出计时器”作业,请尝试将“导出计时器”作业的跨度从5分钟增加到10分钟。 Let import run to be run in short durations for eg 2mins. 让导入运行在短时间内运行,例如2分钟。 Then start debugging the code. 然后开始调试代码。

For debugging: Its very important here to attach debugger with "Owstimer.exe" process in Visual studio to help debug the code of affected Timer Service. 对于调试:在Visual Studio中为调试器附加“ Owstimer.exe”进程非常重要,以帮助调试受影响的Timer Service的代码。 Make sure that you set breakpoints in the code. 确保在代码中设置了断点。 Also make sure you reset SharePoint Timer Services after you done with Timer job deployment 还要确保在完成计时器作业部署后重置SharePoint Timer Services

You can execute these in cmd: 您可以在cmd中执行以下命令:

net stop "Windows SharePoint Services Timer" 净停止“ Windows SharePoint Services计时器”

net start "Windows SharePoint Services Timer" 净启动“ Windows SharePoint Services计时器”

Good luck 祝好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM