How Often Does SPWakeup Need to be Run?

Feb 3, 2009 at 1:07 PM
Hi,
Can anyone tell me how often SPWakeup needs to be run? 

I copied spwakeup.exe, program.cs and sites.conf to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Bin where STSADM.exe sits, edited sites.config to list all my sites then ran spwakeup.exe.  The program ran & appeared to add all listed and discovered sites, then closed down without any errors (I think).  Next I tested the speed of my website and it seemed much faster, but now, several hours later it is behaving much as it did before I ran SPWakeup.

Do I need to set anything else up so that this process is automated, or can I assume that it is still running in the background?  If I need to reboot my server, or restart IIS, do I also need to run SPWakeup again?

Many thanks
Feb 4, 2009 at 3:42 PM
Generally speaking, you only need to run it once per day.  By default IIS recycles the process that serves up web pages every day at 1am.  When this happens, the cache that Sharepoint/WSS has generated for all the pages is discarded.  However, there are several other actions that will cause your server to discard its cache during the day.  Restarting IIS via the "iisreset" command line is the most common, but something as simple as adding a form template via Central Admin does as well.  I usually run spwakeup after making any change to my server.

I did not build any sort of scheduling ability into spwakeup.  I'd recommend using the Windows "at" scheduling service.  Be sure to run the scheduled task under a user account that has access to all your sites.  If you have an account used to index your server for searching, that would be the perfect account to use. 

Just an FYI, you don't need the program.cs file.  That's the source code for the application and I include it in case you want to make any changes to the program.  You only need spwakeup.exe and the sites.config file.