We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7141dc commit 54198bbCopy full SHA for 54198bb
root/etc/services.d/nextcloud/run
@@ -1,11 +1,11 @@
1
#!/bin/sh
2
# Nextcloud Cron s6 service
3
4
-# Signal readiness immediately
5
-s6-ready-when true
+# Signal readiness when the web server is up (so cron doesn't run on a dead app)
+s6-ready-when fetch -qo /dev/null -T 1 http://localhost:8082/daemonless-ping
6
7
# Run cron every 5 minutes
8
while true; do
9
- su -m bsd -c "/usr/local/bin/php -f /usr/local/www/nextcloud/cron.php"
+ s6-setuidgid bsd /usr/local/bin/php -f /usr/local/www/nextcloud/cron.php
10
sleep 300
11
done
0 commit comments