There is a process that runs twice a day but the mail has to be sent just one time whether the process runs twice.
So I can say that first process runs at 2:00 PM and it takes 15-20 min and we have to send the mail at that time after that process completes,
But,
Second Process runs at 4:30 AM and it also takes 15-20 min and after this process we do not have to send the mail.
You can validate the hour between 2 and 3 pm, based on that you can send the email
Another approach is creating a file and then validating it, creating a flag, so if the first process does found the flag that the email has been sent today, it will send the email, if the email was sent today, then the second process will skip the email notification