# Programaticly control download of updates?

**URL:** <https://forums.balena.io/t/programaticly-control-download-of-updates/48894>\
**Category:** Product support\
**Created:** [December 5, 2019, 11:45am UTC](https://forums.balena.io/t/programaticly-control-download-of-updates/48894 "2019-12-05T11:45:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ErikHH](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@ErikHH](https://forums.balena.io/u/ErikHH)\
**Post date:** [December 5, 2019, 11:45am UTC](https://forums.balena.io/t/programaticly-control-download-of-updates/48894/1 "2019-12-05T11:45:11Z")

</div>

Hi,

I was wondering. Is it possible to control from the device when the download for a update will start?

Our devices are connected to the internet by varying means wireless means. It can be satellite or mobile 4g and even public wifi . We do have a means for user interaction with the device.

We would like to give our users control over when updates are downloaded, so they can do it when the connection is cheap. Or maybe we ake something that estimates available bandwith to find the optimum time to force an update.

Is it possible to programmatically control from the device when an update is being downloaded? I found the update lock file, but that just postpones the restart not the downloading.

Also, ideally we’d like to be able to control this for OS updates as well. Maybe using the cloud API?

Cheers,  
Erik

---

<div class="post-metadata">

**Author:** ![karaxuna](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@karaxuna](https://forums.balena.io/u/karaxuna)\
**Post date:** [December 5, 2019, 11:56am UTC](https://forums.balena.io/t/programaticly-control-download-of-updates/48894/8 "2019-12-05T11:56:57Z")

</div>

Hi, you can pin device or application to specific release (both, programmatically and from balena dashboard). See: [https://github.com/balena-io-projects/balena-fleet-management-masterclass#6-release-policy](https://github.com/balena-io-projects/balena-fleet-management-masterclass#6-release-policy)

There is also a method in balena-sdk to [update os](https://www.balena.io/docs/reference/sdk/node-sdk/#devicestartosupdateuuid-targetosversion-%E2%87%92-codepromisecode)

---

<div class="post-metadata">

**Author:** ![ErikHH](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@ErikHH](https://forums.balena.io/u/ErikHH)\
**Post date:** [December 5, 2019, 2:32pm UTC](https://forums.balena.io/t/programaticly-control-download-of-updates/48894/11 "2019-12-05T14:32:56Z")

</div>

Oh yes, that looks great, we can work with that. Thanks for the help!
