AlwaysOn doesn't have period of time: it is web app-scope setting and may be on or off. However you may develop PowerShell script which runs by scheduler and set's AlwaysOn to On and Off at specified times of the day: see e.g. Azure: Powershell: Set-AzureRmWebApp: How to set the “alwaysOn” property.
How can I keep Azure web app always on during a certain time of the day
Hi, How can I turn on the ALWAYS ON option in Azure web app.
However, I only need it to be ALWAYS ON from 11am-11pm.
I don't need it to be always on 24 hours.
How can I do this ?
Azure App Service
2 answers
Sort by: Most helpful
-
-
SnehaAgrawal-MSFT 22,706 Reputation points Moderator
2020-10-19T10:57:57.953+00:00 Thanks for asking question! For Always On feature of Azure App Service, keeps the host process running. This allows your site to be more responsive to request after significant idle periods. Otherwise, once a request comes in, the App Service will have to cold boot and load into memory before responding to the request.
Always On: Keeps the app loaded even when there's no traffic and It's required for continuous WebJobs or for WebJobs that are triggered using a CRON expression.
To add to it this means your app stays loaded in memory, vs being aged out (which prevents long delays when a user first visits after the app's cache has expired). It's not related to the allocated Web App resources being deployed.
In Basic and Standard service plans, you can turn on the Always On setting to keep the app always loaded. To change the Always On setting:
In the Azure portal, go to your web app.
- Select Configuration.
- Select General settings.
- For Always On, select On.
Also, could you please elaborate on what is your idea behind scheduling Always On for a certain time of the day to help you better on this.
Reference: https://learn.microsoft.com/en-us/azure/app-service/configure-common
https://learn.microsoft.com/en-us/azure/app-service/faq-availability-performance-application-issuesLooking forward to help you on this.