# How to run dietpi-update via cron job

**URL:** https://dietpi.com/forum/t/how-to-run-dietpi-update-via-cron-job/16829
**Category:** General Discussion
**Created:** [10 May 2023 11:00 UTC](https://dietpi.com/forum/t/how-to-run-dietpi-update-via-cron-job/16829 "2023-05-10T11:00:04Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [10 May 2023 12:14 UTC](https://dietpi.com/forum/t/how-to-run-dietpi-update-via-cron-job/16829/5 "2023-05-10T12:14:04Z")

</div>

We don’t offer such a functionality by design as we like to get user aware on the update and watch the output. Sometimes there are important in formation changes done or needed software reinstall.

For interactive execution, you might need to `export G_INTERACTIVE=0` [[howto] call dietpi-sync 1 without user interaction - #5 by MichaIng](https://dietpi.com/forum/t/howto-call-dietpi-sync-1-without-user-interaction/15964/5) to avoid user input.

For `apt` package updates, we offer a build-in functionality. No user own script or `cron` would be needed.

> <https://github.com/MichaIng/DietPi/blob/9e3f5d91edc7dc02784efdef1aaefe57b91cccfb/dietpi.txt#L200-L202>

---

_[View the full topic](https://dietpi.com/forum/t/how-to-run-dietpi-update-via-cron-job/16829)._
