Email Alert when Input Threshold Reached

I don’t want to misspeak about SwiftMailer, it is NOT included as standard.
EmonCMS just supports installation of swiftmailer, as of a Post on March 4, 2020

Appreciate your comments.
I prefer to send email as soon as out of spec.

Script Outline:

if [  Leak Detection == 0 ]; then
	echo 'No Leak Detected '
	Leak Detection > response.txt
else
	echo 'Leak Detected Send Email '
	Send Email
	#Yikes! This will bomb me with emails. Need Timer!
fi

This if, then, else script outline would only run once.
I would need a cronjob running every so often.

Now it’s time to roll up the sleeves.

Thanks Again!