File tree 4 files changed +13
-35
lines changed 4 files changed +13
-35
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3
3
# This script is for sending the mailing list the meeting reminders every second
4
4
# Saturday and the Thursday before the next meeting (third Satureday of the month)
5
5
# Add to crontab like so: 0 0 8-14 * * [`date +"%a"`==Sun]&&/path/to/monthlyReminder.sh
6
- # Add to crontab like so: 0 0 * * * [`date +"%a"`== Thu]&& /path/to/monthlyReminder.sh
6
+ # Add to crontab like so: 0 0 * * Thu /path/to/monthlyReminder.sh
7
7
8
+ thelist=" "
8
9
# if Sun then run the python script, else check if the date is new date -3 days
9
10
if [[ ` date +" %a" ` == " Sun" ]]; then
10
- python /path/to/automate/sendemail.py
11
+ while read -r line || [[ -n " $line " ]]; do
12
+ thelist+=$line " ,"
13
+ done < /path/to/email-addresses.txt
14
+ sendmail $thelist < /path/to/monthly-meeting.txt
11
15
else
12
16
source path/to/newDate.txt
13
- nextSat=$( date -d " +3 days" +" %Y%m%d" )
17
+ nextSat=$( date -d " +2 days" +" %Y%m%d" )
14
18
if [[ $nextSat == $saveDate ]]; then
15
- python /path/to/automate/sendemail.py
19
+ while read -r line || [[ -n " $line " ]]; do
20
+ thelist+=$line " ,"
21
+ done < /path/to/email-addresses.txt
22
+ /path/to/sendmail $thelist < /path/to/monthly-meeting.txt
16
23
fi
17
24
fi
Original file line number Diff line number Diff line change 164
164
# write new date to file
165
165
rm -f $PWD /nextDate.txt
166
166
touch $PWD /nextDate.txt
167
- echo " saveDate= " \" ${ saveDate} \" " " > $PWD /nextDate.txt
167
+ echo $ saveDate > $PWD /nextDate.txt
168
168
169
169
170
170
echo " New Date: $newDate Old Date: $oldDate "
Original file line number Diff line number Diff line change 1
- saveDate=" YYYYMMDD"
1
+ YYYYMMDD
You can’t perform that action at this time.
0 commit comments