From: Bill Erickson Date: Wed, 28 Jan 2015 16:34:45 +0000 (-0500) Subject: JBAS-315 add circ anonymization crontab entries X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=994ff00eb046f78a27ffbb076c34daea1068701c;p=working%2FEvergreen.git JBAS-315 add circ anonymization crontab entries Signed-off-by: Bill Erickson --- diff --git a/KCLS/utility-scripts/CRONTAB b/KCLS/utility-scripts/CRONTAB index 80f6b7d17b..d0500137e8 100644 --- a/KCLS/utility-scripts/CRONTAB +++ b/KCLS/utility-scripts/CRONTAB @@ -89,3 +89,17 @@ PGHOST = localhost # change for cluster install # TODO: use syslog / logrotate instead #10 2 * * * find /var/log/evergreen -type f -ctime +60 -delete #30 2 * * * find /var/log/evergreen -type f -ctime +2 -exec gzip {} \; + + +# Anonymize a range of historical circs each night, with a maximum run +# time of 120 minutes. We split them up, because each range takes time +# to run (~45 minutes). The first range starts at 2004-08-12, which is the +# oldest xact_finish date in the database. The last range brings us up +# to today - 6 months, which are the youngest circs we want to anonymize. +0 0 * * 1 cd $SCRIPT_DIR/purge_circs/ && bash purge_circulations.sh --start 2004-08-12 --end 2010-01-01 --increment "1 year" --duration 120 >> /openils/var/log/purge_circs.log +0 0 * * 2 cd $SCRIPT_DIR/purge_circs/ && bash purge_circulations.sh --start 2010-01-01 --end 2011-01-01 --increment "1 year" --duration 120 >> /openils/var/log/purge_circs.log +0 0 * * 3 cd $SCRIPT_DIR/purge_circs/ && bash purge_circulations.sh --start 2011-01-01 --end 2012-01-01 --increment "1 year" --duration 120 >> /openils/var/log/purge_circs.log +0 0 * * 4 cd $SCRIPT_DIR/purge_circs/ && bash purge_circulations.sh --start 2012-01-01 --end 2013-01-01 --increment "1 year" --duration 120 >> /openils/var/log/purge_circs.log +0 0 * * 5 cd $SCRIPT_DIR/purge_circs/ && bash purge_circulations.sh --start 2013-01-01 --end 2014-01-01 --increment "1 year" --duration 120 >> /openils/var/log/purge_circs.log +0 0 * * 6 cd $SCRIPT_DIR/purge_circs/ && bash purge_circulations.sh --start 2014-01-01 --end $(date -d -6months-1day +'\%F') --increment "1 year" --duration 120 >> /openils/var/log/purge_circs.log +