diff --git a/stack.yml b/stack.yml
index 6fe1e2c400942b0dee83548920886001ecc9faef..631ab0459524bf8d0734699ea5a083d7e4206d57 100644
--- a/stack.yml
+++ b/stack.yml
@@ -31,20 +31,7 @@ services:
     restart: always
     volumes:
       - nextcloud:/var/www/html
-    user: www-data
-    entrypoint: |
-      bash -c 'bash -s <<EOF
-        trap "break;exit" SIGHUP SIGINT SIGTERM
-
-        while [ ! -f /var/www/html/config/config.php ]; do
-          sleep 1
-        done
-
-        while true; do
-          php -f /var/www/html/cron.php
-          sleep 15m
-        done
-      EOF'
+    entrypoint: /cron.sh
     depends_on:
       - db