#! /bin/bash
# send_info_mailing_20190906.sh - script to run send_info_mailing_20190906.php in a loop
# This script is needed because the underlying PHP script appears to have a memory leak,
# so in order to avoid system memory exhaustion we run a loop around it.

nextstep="Continue"
while [ ${nextstep} != "Stop" ]
do
	php -f send_info_mailing_20190906.php | tee send_info_mailing_20190906_run.txt
	nextstep=$(tail -1 send_info_mailing_20190906_run.txt)
done
