I'm in charge of a printer, so I wrote a script which runs every 5 minutes and figures out if the printer has paper. If it doesn't, the script will text me. The problem is, if I'm busy, and can't fill the printer, I don't want the script to continue to text me every 5 minutes. Is there a way I can force it to only send me at most 1 text every 8 hours or so, to ensure that the script doesn't text me twice for the same out-of-paper situation? The only thing I can currently think of is to create a db of times that I get texts, then make sure that the most recent one wasn't too long ago, or to create a local file with the most recent time in it.
Thanks!