3 # script used to batch process longoverdue circs between 3 years and 6 months old.
4 # it updates the action_trigger.event_definition for marking items longoverdue, then
5 # runs the process, looping until $DELAY reaches 6 months.
13 while [ "$DELAY" -ge 6 ]; do
14 echo "`date`: Entering $DELAY months as delay and $MAX_DELAY months as max delay"
15 $PSQL -U $PSQL_USER -h $DB_HOST -c "UPDATE action_trigger.event_definition SET delay = '$DELAY months'::interval, max_delay = '$MAX_DELAY months'::interval WHERE id = 49;"
16 . /etc/profile && /openils/bin/action_trigger_runner.pl --osrf-config /openils/conf/opensrf_core.xml --process-hooks --run-pending --granularity longoverdue --granularity-only
18 MAX_DELAY=$[$MAX_DELAY-1]