0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-21 11:06:09 +02:00
nextcloud-docker/docker-cron.sh
Roland Vet 0c7ef56635 Replace crond with a while loop.
Adding the cron command to  /var/spool/cron/crontabs/www-data assumes
that cron, and by extension the nextcloud app, is run as 'www-data'.

'crond' cannot be used with:
exec "echo \"*/%%CRONTAB_INT%% * * * * php -f /var/www/html/cron.php\" | crontab - && crond -f -l 0 -L /dev/stdout"
because that assumes the uid used matches a entry in '/etc/passwd'.

Signed-off-by: Roland Vet <vet.roland@gmail.com>
2021-11-15 15:46:22 +01:00

7 lines
107 B
Bash
Executable file

#!/bin/sh
set -eu
while [ 1 ]; do
(php -f /var/www/html/cron.php &);
sleep %%CRONTAB_INT%%m;
done