How to automatically restart an app service after certain time?

前端 未结 4 1179
时光说笑
时光说笑 2021-01-19 00:56

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?

4条回答
  •  再見小時候
    2021-01-19 01:47

    You can also do this using LogicApps or RunBooks. Here is an example that uses Logic Apps: https://blog.aggregatedintelligence.com/2020/01/restarting-web-app-using-logic-apps.html

    Basically, you create a trigger, and then you add a "Azure RM Invoke Action". The settings needed arent well documented, so I documented it in my blog post. This is basically the simplest way to make sure it happens on a schedule and brings together what has been previously discussed with regards to the REST API (the Azure RM action is using it under the covers), web-job (dont need to create one, as LogicApp will run it for you).

提交回复
热议问题