Updates
This commit is contained in:
18
nextcloud-aio/Containers/nextcloud/cron.sh
Normal file
18
nextcloud-aio/Containers/nextcloud/cron.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
wait_for_cron() {
|
||||
set -x
|
||||
while [ -n "$(pgrep -f /var/www/html/cron.php)" ]; do
|
||||
echo "Waiting for cron to stop..."
|
||||
sleep 5
|
||||
done
|
||||
echo "Cronjob successfully exited."
|
||||
exit
|
||||
}
|
||||
|
||||
trap wait_for_cron SIGINT SIGTERM
|
||||
|
||||
while true; do
|
||||
php -f /var/www/html/cron.php &
|
||||
sleep 5m &
|
||||
wait $!
|
||||
done
|
||||
Reference in New Issue
Block a user