How to automatically restart an app service after 24 hours? How to schedule the app service to restart automatically at a specific time through the use of web jobs?
You can achieve this by creating a web job and placing a PowerShell script to stop and start the web app.
To perform start/stop operation of Azure App Service, the web job should have access to your subscription. It also requires your Azure profile.
Login-AzureRmAccount
Save-AzureRmProfile -Path "E:\azureprofile.json"
To Create PowerShell to stop/start App Service
Create a new folder and place the publish profile downloaded in previous step.
Create a PowerShell and save as run.ps1
$ProgressPreference= "SilentlyContinue"
Select-AzureRmProfile -Path "azureprofile.json"
Select-AzureRmSubscription -SubscriptionId ''
Stop-AzureRmWebApp -Name '' -ResourceGroupName ''
Start-AzureRmWebApp -Name '' -ResourceGroupName ''
Add this in your App service web job section and run based on your requirement by creating a cron expression.
Reference: Azure App Services: Automate Application restart using Web Job