SharePoint 2007 计时器作业
我在 SharePoint 2007 中开发了自定义计时器作业。我遇到的问题是,计时器作业正确执行了几次,之后它停止工作,如果我检查作业的状态,它就会停留在“初始化”模式。如果我删除并添加作业定义,它将以“成功”状态再次开始工作几次,之后再次出现相同的问题。
有什么想法吗?
赫赖尔
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. 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能正在开发自定义内容部署作业,以便在不同的 Web 应用程序之间导出和导入内容。因此,可能是导出未正确执行,或者可能是作业执行期间导出失败。不同工作之间也可能存在依赖性。
我建议您采取以下操作:
如果您正在处理导入和导出计时器作业,请尝试将导出计时器作业的时间范围从 5 分钟增加到 10 分钟。让导入运行在短时间内运行,例如 2 分钟。然后开始调试代码。
对于调试:在 Visual Studio 中将调试器附加到“Owstimer.exe”进程非常重要,以帮助调试受影响的计时器服务的代码。确保在代码中设置断点。另请确保在完成计时器作业部署后重置 SharePoint 计时器服务
您可以在 cmd 中执行这些操作:
net stop "Windows SharePoint Services Timer"
net start "Windows SharePoint Services Timer"
祝你好运
It might be that you are developing the Customized Content Deployment job for Export and Import of the Contents between different Web applications. 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. Let import run to be run in short durations for e.g. 2mins. 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. Make sure that you set breakpoints in the code. Also make sure you reset SharePoint Timer Services after you done with Timer job deployment
You can execute these in cmd:
net stop "Windows SharePoint Services Timer"
net start "Windows SharePoint Services Timer"
Good luck