# Dockerized NC, cron is not working

**URL:** <https://help.nextcloud.com/t/dockerized-nc-cron-is-not-working/105836>\
**Category:** ℹ️ Support\
**Created:** [January 27, 2021, 4:04pm UTC](https://help.nextcloud.com/t/dockerized-nc-cron-is-not-working/105836 "2021-01-27T16:04:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Reiner\_Nippes](https://help.nextcloud.com/user_avatar/help.nextcloud.com/reiner_nippes/32/9479_2.png) [@Reiner\_Nippes](https://help.nextcloud.com/u/Reiner_Nippes)\
**Post date:** [January 27, 2021, 5:47pm UTC](https://help.nextcloud.com/t/dockerized-nc-cron-is-not-working/105836/2 "2021-01-27T17:47:23Z")

</div>

> [@nifeyer](#):
>
> **But inside the container no process labeled “cron” seems to be running** (checked with top).

use the host cronjob with `docker exec ...`.

> [@Docker setup & cron](https://help.nextcloud.com/t/docker-setup-cron/78547/8):
>
> use this script as cronjob. do not try to enable cron inside the contaier. inside any container. so you just add docker exec --user www-data nextcloud php occ preview:pre-generate assuming that your container name is nextcloud and www-data the web server user. just saying. this is a way to enable crond inside a container. exec executes everything you use as the first argument. e.g. a shell skript has no +x bit. exec that-skript is your friend. and busybox crond just starts the cron daemo…

---

_[View the full topic](https://help.nextcloud.com/t/dockerized-nc-cron-is-not-working/105836)._
