We have a staged environment with 1 CMS and 3 Slave servers
I want to create a page on the slave server, which will be called by the staging module on a successful publish, that will rebuild all indexes and the links database.
I know I can use:
Globals.LinkDatabase.Rebuild(Factory.GetDatabase("web"));
to rebuild the link database.
How do I get the above code in a separate process that has access to the sitecore context and also how do I rebuild all the indexes for the web database - again in a separate background thread.
Thanks