You host a web application on an Azure App Service web app named WebApp1 that runs on a Basic B1 App Service plan. You deploy a continuous background processing task to WebApp1 using Azure WebJobs. You observe that the WebJob stops executing shortly after you close your browser or when there is no active traffic to the web app. What should you do to ensure that the WebJob runs continuously without interruption?
- AConfigure a custom autoscale rule on the Basic B1 App Service plan to maintain a minimum of two instances.
- BEnable the Always On setting in the configuration settings of the current Basic B1 App Service plan.
- Upgrade the App Service plan to the Standard S1 tier and enable the Always On setting.Cevap
- DConfigure a triggered WebJob with a CRON expression to run the background task every hour.
Cevap
Upgrade the App Service plan to the Standard S1 tier and enable the Always On setting.
Upgrading the App Service plan to the Standard S1 tier allows you to enable the Always On setting. The Always On setting keeps the web app loaded in memory even when there is no active HTTP traffic, which is a prerequisite for continuous WebJobs to run properly.
Adım Adım Çözüm
Anahtar Kavram
Enabling Always On for continuous WebJobs and App Service plan tier limits