Manually start SharePoint timer job
Asked Answered
R

1

5

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.

Rahmann answered 16/7, 2009 at 14:26 Comment(0)
W
8

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.

Wolford answered 16/7, 2009 at 14:42 Comment(1)
If you want to take it one step further you can turn the command line tool into a stsadm extension. Here is how you do it: sharepointsolutions.blogspot.com/2006/09/…Twinflower

© 2022 - 2024 — McMap. All rights reserved.