I have an Azure Cloud Service that requires some warm up when an application pool comes online (typically 5-10 minutes). Because of this, I like to schedule an IIS\App Pool recycle during off hours. When my recycle takes place mid-day, I get users yelling at me (and I prefer to not get yelled at)
What I've been doing is remoting into the VM, add a cmd file to a local disk and create a scheduled task that runs the cmd file:
net stop "World Wide Web Publishing Service"
net start "World Wide Web Publishing Service"
My problem is, periodically PaaS services get "refreshed", so randomly, any code\files I manually publish to a cloud service VM disappear. I need to remote back into the machines and re-add my cmd and scheduled tasks.
I know cloud services allow you to run startup tasks and the like. Can I do something similar to startup tasks that would allow me to package this cmd file when I publish my app, but schedule these commands externally? If so.. how?