Hi All
Happy new year to you all. Hope your Xmas was good too.
I have a question, in my existing script I carry out the following:-
if test ...
then
do whatever I want
fi
else
send an email to notify users of the problem
end
This script runs in cron every 10 minutes. When the script runs it carries out a check in a directory to see if a file exists if it does then the script continues. If the file doesn't exists it then sends an email out and exists the script. I need to make my script only send an email out once so that the next time the script runs I need to check if an email has already been sent out so don't send another email out. I am ending up with hundreds of notification emails.
Basically in words within the else statement above I need a further check not sure how to best do this. Anyone have any clues would be most grateful.
Many thanks in advance.
Happy new year to you all. Hope your Xmas was good too.
I have a question, in my existing script I carry out the following:-
if test ...
then
do whatever I want
fi
else
send an email to notify users of the problem
end
This script runs in cron every 10 minutes. When the script runs it carries out a check in a directory to see if a file exists if it does then the script continues. If the file doesn't exists it then sends an email out and exists the script. I need to make my script only send an email out once so that the next time the script runs I need to check if an email has already been sent out so don't send another email out. I am ending up with hundreds of notification emails.
Basically in words within the else statement above I need a further check not sure how to best do this. Anyone have any clues would be most grateful.
Many thanks in advance.