question

11989479 avatar image
0 Votes"
11989479 asked 11989479 commented

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

How to start/stop container application at specificed time?

azure-iot
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SandervandeVelde42 avatar image
0 Votes"
SandervandeVelde42 answered 11989479 commented

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.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

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

Yes

Thanks for your feedback, I will learning the [IoT Hub Rest API][1].


[1]: https://docs.microsoft.com/en-us/rest/api/iothub/service/configuration/applyonedgedevice
0 Votes 0 ·