From: Nicolas Boisselier Date: Sun, 13 Jul 2025 07:10:40 +0000 (+0200) Subject: etc/cron/nb X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=4a98a8f28f6428abc0d18fc8d2e76da61f19cbcb;p=nb.git etc/cron/nb --- diff --git a/bin/nb-update b/bin/nb-update index 9b91ef9b..06549ed4 100755 --- a/bin/nb-update +++ b/bin/nb-update @@ -6,7 +6,7 @@ # ##################################################################### NAME="$(basename "${0}")" -[ -e "/run/$NAME.no" ] && exit +# NB 13.07.25 Done in crontab [ -e "/run/$NAME.no" ] && exit LOCK="/run/nb/$NAME.lock" [ -z "$UID" ] && UID="$(id -u)" diff --git a/etc/cron/nb b/etc/cron/nb index 5917d0f0..402758a8 100644 --- a/etc/cron/nb +++ b/etc/cron/nb @@ -4,16 +4,18 @@ #LANG=C SHELL=/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +NB_NOCRON=/run/nb-update.no ##################################################################### # m h dom mon dow user command # @reboot root . /etc/profile && sleep 30 && nb-update >/var/log/nb-update.log 2>&1 | true -*/30 09-23 * * * root . /etc/profile && nb-update >/var/log/nb-update.log 2>&1 | true -13 00 * * * root . /etc/profile && nb-update -cleanup >/var/log/nb-update.log 2>&1 | true -13 01-08 * * * root . /etc/profile && nb-update >/var/log/nb-update.log 2>&1 | true -25 5 * * * root which run-parts &> /dev/null && . /etc/profile && [ -d "$NB_ROOT" -a -d "$NB_ROOT/etc/cron.daily" ] && cd / && run-parts --report $NB_ROOT/etc/cron.daily -47 4 * * 7 root which run-parts &> /dev/null && . /etc/profile && [ -d "$NB_ROOT" -a -d "$NB_ROOT/etc/cron.weekly" ] && cd / && run-parts --report $NB_ROOT/etc/cron.weekly -52 3 1 * * root which run-parts &> /dev/null && . /etc/profile && [ -d "$NB_ROOT" -a -d "$NB_ROOT/etc/cron.monthly" ] && cd / && run-parts --report $NB_ROOT/etc/cron.monthly -52 1 1 * * root which run-parts &> /dev/null && . /etc/profile && [ -d "$NB_ROOT" -a -d "$NB_ROOT/etc/cron.yearly" ] && cd / && run-parts --report $NB_ROOT/etc/cron.yearly +*/30 09-23 * * * root [ ! -e "$NB_NOCRON" ] && . /etc/profile && nb-update > /var/log/nb-update.log 2>&1 | true +13 00 * * * root [ ! -e "$NB_NOCRON" ] && . /etc/profile && nb-update -cleanup > /var/log/nb-update.log 2>&1 | true +13 01-08 * * * root [ ! -e "$NB_NOCRON" ] && . /etc/profile && nb-update > /var/log/nb-update.log 2>&1 | true + +25 5 * * * root [ ! -e "$NB_NOCRON" ] && which run-parts &> /dev/null && . /etc/profile && [ -d "$NB_ROOT" -a -d "$NB_ROOT/etc/cron.daily" ] && cd / && run-parts --report $NB_ROOT/etc/cron.daily +47 4 * * 7 root [ ! -e "$NB_NOCRON" ] && which run-parts &> /dev/null && . /etc/profile && [ -d "$NB_ROOT" -a -d "$NB_ROOT/etc/cron.weekly" ] && cd / && run-parts --report $NB_ROOT/etc/cron.weekly +52 3 1 * * root [ ! -e "$NB_NOCRON" ] && which run-parts &> /dev/null && . /etc/profile && [ -d "$NB_ROOT" -a -d "$NB_ROOT/etc/cron.monthly" ] && cd / && run-parts --report $NB_ROOT/etc/cron.monthly +52 1 1 * * root [ ! -e "$NB_NOCRON" ] && which run-parts &> /dev/null && . /etc/profile && [ -d "$NB_ROOT" -a -d "$NB_ROOT/etc/cron.yearly" ] && cd / && run-parts --report $NB_ROOT/etc/cron.yearly