January 18th, 2012, 05:13 PM
[RESOLVED] How can I restart a thread at midnight?
I am running Ubuntu 11.04.
I have an application that downloads data from the remote web server. This web server shuts down for maintenance at midnight for about ten minutes. So I need to disconnect from the server at 11:55pm and connect again at 12:05am. I use sockets so to disconnect I need to logout and close the socket, and to re-connect I need to open socket and logon. The part of my application that downloads data runs in its own thread.
So I need to stop the thread at 11:55pm and start at 12:05am. How can I do that in non-blocking way? I do not want to run a loop and poll for system time that will suck up CPU time.
Last edited by vincegata; January 19th, 2012 at 03:30 PM.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!