手动启动 SharePoint 计时器作业 [英] Manually start SharePoint timer job

查看:64
本文介绍了手动启动 SharePoint 计时器作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想手动调用安装在 SharePoint 服务器上的计时器作业.有用的是类似于 stsadm 命令的内容.

I'd like to invoke a timer job installed on a SharePoint server manually. What would be useful is something along the lines of an stsadm command.

我的情况是,我已将具有一系列功能的解决方案部署到客户服务器.我不想等待每周计划来启动特定的计时器工作.我只想输入一个命令来立即运行特定的工作.显然,在开发环境中,我已将时间表设置为几分钟,但我想在与客户现场时进行测试运行.

My scenario is, I've deployed a solution with a bunch of features to a customers server. I don't want to wait for the weekly schedule to kick a particular timer job to life. I would like to just punch in a command to get the specific job to run immediately. Obviously in the development enviroment I've got the schedule set for a few minutes but I want to do a test run while I'm on site with the customer.

推荐答案

您可以开发基于自定义命令行的工具,该工具根据从 service.JobDefinitions 集合中标识您的作业的条件获取作业的 SPJobDefiniton.从那里您可以使用 Execute() 方法执行它.

You can develop a custom command line based tool that gets the job's SPJobDefiniton based on the criteria that identifies your job from the service.JobDefinitions collection. From there you can execute it using the Execute() method.

这篇关于手动启动 SharePoint 计时器作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆