I have created a PHP script that runs from the command line. It opens a connection to a POP3 email account and downloads all emails and writes them in a database, and removes them from download once I get this script called by the command line from the bat file. In return I have created a scheduled task that invites the bat file every 5 minutes. The thing is that I have set this fact for zero that sometimes emails with large attachments can be emailed and the script actually downloads the attachments and stores them as raw files offline and there is no timeout So that the script does not die out during the download.
I have found that the program sometimes hangs up and gets a little bothered - it always hangs, like the connections on the connection and the mail server are connected. And because the timeout is set to zero, it seems that this situation stays in power. And this work is not technically hung up due to this.
I want the program to be timed out while downloading the email - although at points where it is communicating on a connection or the mailserver should only have an expiration at that point and the remaining Program execution should not be.
How can I do this? (
If you use direct sockets If you are doing then the timeout value can be set using the socket_set_timeout ()
. You should check your docs using a library, but I'll check whether In fact is a timeout problem and you can browse all of them. Some acceptable prices (such as 10 minutes) and If you hang the log again, check the log, if it is always the same line where this is unsuccessful.
Comments
Post a Comment