summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xutil/cron.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/util/cron.sh b/util/cron.sh
index 632afbb..237f7d3 100755
--- a/util/cron.sh
+++ b/util/cron.sh
@@ -9,5 +9,9 @@ PSQL="psql -U manned -Awtq"
./fedora.sh current
./ubuntu.sh current
-echo "============ Updating SQL indices"
-$PSQL -f update_indices.sql
+# Only update indices once a week (on mondays). This process is slow and the data doesn't often change anyway.
+if [ `date +%u` == 1 ]
+then
+ echo "============ Updating SQL indices"
+ $PSQL -f update_indices.sql
+fi