run-nightly.sh: run cron.sh in the background

Check that cron.sh is not already running.
With no new snapshot cron.sh takes about 1min.
This commit is contained in:
Jens Petersen 2016-12-06 16:18:54 +09:00
parent ad174b354c
commit 37b14ac860

View File

@ -4,11 +4,11 @@ cd "$(dirname "${BASH_SOURCE[0]}")"
while true; do
./build.sh nightly-$(date -u +%F)
date
echo -n "Running cron.sh (do not interrupt)... "
./cron.sh > cron.log 2>&1
echo "done."
if ! pgrep cron.sh >/dev/null; then
echo
echo "Running cron.sh in the background"
./cron.sh > cron.log 2>&1 &
fi
echo
date