From 0c263f8af482bcfd5a53124e35d3d21070ec2f93 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Wed, 26 May 2021 21:49:44 +0200 Subject: [PATCH] change crontab on all installations to 5 minutes (#1998) --- nextcloud_update.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nextcloud_update.sh b/nextcloud_update.sh index 89727478..777fb91d 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -954,6 +954,14 @@ then fi fi +# Fix crontab every 5 minutes instead of 15 +if crontab -u www-data -l | grep -q "\*/15 \* \* \* \* php -f $NCPATH/cron.php" +then + crontab -u www-data -l | grep -v "php -f $NCPATH/cron.php" | crontab -u www-data - + crontab -u www-data -l | { cat; echo "*/5 * * * * php -f $NCPATH/cron.php > /dev/null 2>&1"; } | crontab -u www-data - + print_text_in_color "$ICyan" "Nextcloud crontab updated to run every 5 minutes." +fi + # Change owner of $BACKUP folder to root chown -R root:root "$BACKUP"