'Python program not working after sleep mode?
I have a python program that sends logs every 5 minutes to my email address via gmail smtp. Oversimplified, the report function looks something like this:
def report(self):
if something == true:
self.sendmail()
self.anotherfunction()
It works perfect most of the time. I have got try except in there as well, and so it sends me error logs when it crashes. Now the problem is, that sometimes, it just stops working; it doesn't send anything. When I come back to the computer, the program is still running, although it is not doing anything. (also, no error logs get sent, although they normally do) The computer goes into sleep mode sometimes. I am also fairly sure that the problem is with the report function (smtp), and not the if statement. In my opinion, this may be precisely due to the computer going into sleep mode. Do you think that could affect the program working? If yes, what could the possible solution be? Since I am a beginner, I apologize if I didn't formulate the question as clearly as it should be formulated, but I really have no idea.
Thanks a lot for your suggestions.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
