From 9a272988d3ad19cce58a38747e56cce6f2dbfb42 Mon Sep 17 00:00:00 2001 From: vincent porte Date: Tue, 28 Nov 2023 18:56:57 +0100 Subject: [PATCH] (metabase) cronify extract_tables --- clevercloud/cron.json | 1 + clevercloud/extract_tables.sh | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100755 clevercloud/extract_tables.sh diff --git a/clevercloud/cron.json b/clevercloud/cron.json index 736d92d6a..2c3d37b13 100644 --- a/clevercloud/cron.json +++ b/clevercloud/cron.json @@ -1,4 +1,5 @@ [ + "0 3 * * 0 $ROOT/clevercloud/extract_tables.sh", "0 4 * * 0 $ROOT/clevercloud/rebuild_index.sh", "5 4 * * * $ROOT/clevercloud/update_index_daily.sh", "0 5 * * * $ROOT/clevercloud/collect_daily_matomo_stats.sh", diff --git a/clevercloud/extract_tables.sh b/clevercloud/extract_tables.sh new file mode 100755 index 000000000..067f2cb75 --- /dev/null +++ b/clevercloud/extract_tables.sh @@ -0,0 +1,17 @@ +#!/bin/bash -l + +# Rebuild index for the search engine. +# +# About clever cloud cronjobs: +# https://www.clever-cloud.com/doc/tools/crons/ +# + +if [[ "$INSTANCE_NUMBER" != "0" ]]; then + echo "Instance number is ${INSTANCE_NUMBER}. Stop here." + exit 0 +fi + +# $APP_HOME is set by default by clever cloud. +cd $APP_HOME + +python manage.py extract_tables