In VSTS Release, how do I stop all continuous webjobs and remove schedule from triggered webjobs for specific deployment slot?
scenario:
I have a asp.net core web application with bunch of webjobs. Some of them are scheduled, some are continuous.
In VSTS Release I deploy the webjobs together with web app to App Service using Web Deploy.
However, in staging environment I don't want to run the webjobs, since they would interfere with production (the share the same database, etc).
I guess I would have to write some powershell to stop the webjobs. It comes down to these steps:
- How do I run PowerShell in VSTS that is connected to my Azure Subscription
- How do I list all webjobs for my webapp and deployment slot
- How do I stop continuous webjob
- How do I set trigger to manual and remove schedule from scheduled webjobs