does the program actually go to sleep and never wake up or does it crash ?
maybe something you are doing in the code is throwing an exception that is not being handled ?
Since the program works fine for a few hours, it may be somthing related to memory ?
Can you post the code of the loop ?
What does the program do when it wakes up ? maybe the file handling of the log file causes some exception after sometime ?
Just shooting off some thoughts ...
hope this helps ..
[This message has been edited by Karthikraj Magapu (edited December 12, 2001).]