diff options
author | Yorhel <git@yorhel.nl> | 2019-05-09 13:11:15 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-05-09 13:11:15 +0200 |
commit | fbd7b71d730edea4d7de5461ebb4ad6c9dd95b83 (patch) | |
tree | 4f85ab467f51be4b6e0ac9729d466a411f7662af | |
parent | e926f8983857e5b8b072e2c070f2948609c460e3 (diff) |
Only update SQL caches on Mondays
-rwxr-xr-x | util/cron.sh | 8 |
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 |