[Azure]How to start/stop container application at specificed time?

罗宇恒 罗宇恒 571 Reputation points
2021-04-09T10:07:16.04+00:00

How to start/stop container application at specificed time?

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
378 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sander van de Velde 28,311 Reputation points MVP
    2021-04-09T15:04:09.807+00:00

    Hello @11989478,

    it seems you want to start and stop Azure IoT Edge containers on the edge at specific moments in time?

    There is no standard service available for that. You have to build it yourself.

    As you can see in the Azure Portal, modules can be enabled and disabled by deploying a new version of the deployment manifest.

    You can deploy an updated version using eg. an Azure DevOps pipeline or with CLI or with custom code in an Azure Function.

    If you want to program it yourself, take a look at the specific IoT Hub Rest API call.

    An example of how to call this API can be found seen here.

    You can then execute this API call inside an Azure Function at the right under the correct circumstances.

    Sending deployment manifest is a serious endeavor. You have to do housekeeping on that deployment manifest.

    I suggest researching if calling a Direct Method to start/stop the logic inside the container is also a solution for your use case.

    Using a Direct Method gives you control with the utmost precision.


0 additional answers

Sort by: Most helpful