Pages

Saturday, May 28, 2011

Alter Sharepoint Timer Job Schedule - Object Model

If you want to alter a Sharepoint Timer Job Schedule without uninstall it, you can do it by an STSADM command like this one:
stsadm -o setcontentdeploymentjobschedule  -jobname "YourJobName"  -schedule "Weekly between Fri 22:00:00 and Sun 06:00:00"

But, this is only available if you are using MOSS. This stsadm command isn't available in WSS's, so in order to alter an timer job's schedule without going through all uninstall and install feature process, you can go by object model.

To simplify, we do a Console Application to comply our purpose. At main method...














And to finish we just do like this:































Done! ;)

References:
http://blogs.technet.com/b/josebda/archive/2008/03/15/complete-reference-of-all-stsadm-operations-with-parameters-in-moss-2007-sp1.aspx
http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/b29627df-ac9f-4eff-9d83-bf57a03848a8
http://www.codeguru.com/cpp/misc/misc/microsoftofficeoutlook/print.php/c14133

No comments:

Post a Comment