]> git.evergreen-ils.org Git - Evergreen.git/blob - Evergreen/src/support-scripts/eg_gen_overdue.sh
adding version 1 overdue notice generator
[Evergreen.git] / Evergreen / src / support-scripts / eg_gen_overdue.sh
1 #!/bin/bash
2 # ---------------------------------------------------------------
3 # This file runs the overdue generation script.
4 # If today is Monday, it runs the script for Sat/Sun/Mon, 
5 # otherwise it runs once per day.
6 # ---------------------------------------------------------------
7
8
9 DATE=$(date +%Y-%d-%m);
10 DAY=$(date +%u);
11 BSCONFIG="/openils/conf/bootstrap.conf"
12
13 [ $(whoami) != "opensrf" ] && echo "Must be run as opensrf" && exit 1;
14 source /etc/profile;
15 ARGS="0"
16
17 # If today is monday, run for sat/sun/mon
18 if [ "$DAY" == "1" ]; then ARGS="2 1 0"; fi;
19
20 ./eg_gen_overdue.pl $BSCONFIG $ARGS > "/tmp/EG_overdue.$DATE.xml"
21
22