Mar6

Deploying Timer Jobs

 Categories: Deployment, SharePoint

So I'm working on a Timer Job for SharePoint at the moment, I found that the post that Andrew Connell has made describing the development proces is very good, read it here: http://www.andrewconnell.com/blog/articles/CreatingCustomSharePointTimerJobs.aspx
 
Anyway I was trying to debug my job by attaching to the OWSTIMER process and it appeared that the process was running an old version of my code. :o\ It appears that to ensure that the newly deployed version of the DLL that you have deployed to the GAC you need to restart the OWSTIMER process.
 
So  I've included that into my script to deploy and everything is happy again. Below is a sample deployment script for your reference.
 
net stop sptimerv3

rd /s /q "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\MyTimerJob"
mkdir "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\MyTimerJob"

copy /Y feature.xml "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\MyTimerJob\"

gacutil /u MyTimerJob
gacutil /i bin\debug\MyTimerJob.dll

pushd %programfiles%\common files\microsoft shared\web server extensions\12\bin

stsadm -o deactivatefeature -filename MyTimerJob\feature.xml -url http://col/ -force
stsadm -o uninstallfeature -filename MyTimerJob\feature.xml -force
stsadm -o installfeature -filename MyTimerJob\feature.xml -force
stsadm -o activatefeature -filename MyTimerJob\feature.xml -url http://col/ -force

popd

net start sptimerv3
Tags:

 

Links to this post

Enterprise Collaboration and Virtual Teams Report (March 7, 2008)

Trackback from Effective Collaboration on 07 Mar 2008 05:07

CKS:EBE Resources

Trackback from thekid.me.uk on 12 Mar 2008 11:58

Comments

Leave a comment