diff --git a/cron.sh b/cron.sh index ecade74..a6228d6 100644 --- a/cron.sh +++ b/cron.sh @@ -3,13 +3,14 @@ # explicitly without "-e" for it should not exit immediately when failed but write a mail set -uo pipefail # See http://redsymbol.net/articles/unofficial-bash-strict-mode/ # Execute via crontab by hduser@weywot1: -# 00 1 * * * [removed] git/lobid-gnd ; bash -x cron.sh >> logs/cron.sh.log 2>&1" +# 40 * * * * [removed] git/lobid-gnd ; bash -x cron.sh >> logs/cron.sh.log 2>&1" # 50 05 * * * [removed] git/lobid-gnd ; bash -x cron.sh 1day >> logs/cron.sh.log 2>&1" - IFS=$'\n\t' RECIPIENT=lobid-admin START_UPDATE=$(tail -n1 GND-lastSuccessfulUpdate.txt) +TEST_INDEX=gnd-test +INDEX=gnd unset http_proxy if [ -n "${1-}" ] && [ "$1" = "1day" ]; then @@ -19,13 +20,13 @@ fi sbt -mem 4000 "runMain apps.ConvertUpdates ${START_UPDATE}" if [ -s GND-updates.jsonl ]; then - sbt -Dindex.prod.name=gnd-test "runMain apps.Index updates" - bash ./checkCompactedProperties.sh gnd-test + sbt -Dindex.prod.name=$TEST_INDEX "runMain apps.Index updates" + bash ./checkCompactedProperties.sh $TEST_INDEX # if check ok, index to productive instance: if [ $? -eq 0 ]; then - sbt -Dindex.prod.name=gnd "runMain apps.Index updates" - bash ./checkCompactedProperties.sh gnd + sbt -Dindex.prod.name=$INDEX "runMain apps.Index updates" + bash ./checkCompactedProperties.sh $INDEX fi fi