Well, if you only want to be notified once an hour, it'd be simplest to only run the script once an hour.
If you want to be notified once/hr, but run script more often than once/hr, you could just use the date cmd to generate the current date time in the Format YYYYMMDDHHMI and save it to a file somewhere.
Next time round, generate current datetime in same format and subtract the 2 nums. If the difference > 60 (minutes), re-send the email.
|