Search code examples
azureazure-webjobs

Does Azure Webjob stop when Azure App Service is stopped


In our current setup there are 2 slots for an Azure App service, the question that I have is, when the slot is stopped would it also shut down the webjob that is deployed on that slot or would the web job continue to run?


Solution

  • It is possible to run an Azure WebJob even when the Azure App Service Web App is not running.

    Though you can force the WebJob not to run or stop when the Web App is running using WEBJOBS_STOPPED setting in your Web App's "Application Settings"

    Take a look at this article about this subject for more details:

    https://blogs.msdn.microsoft.com/benjaminperkins/2017/03/01/failed-to-run-webjob/

    The following picture shows a running WebJob when the web app is not running:

    enter image description here