Hi I have created a little application to move some files around and put them into a database. This is working well except that the application needs a timeout.
If my app has not completed the task within 2 hours it re opens and locks out everything. I need to say that if my application has been open for 2 hours close it.
One thought was can you set a time out in an application. I have had a google for this and found some stuff in system.threading about timeout=infinite and threading.sleep=200 but don’t really understand this.
Another thought, is using the timer and counting up to 2 hours and then calling a close method, this seams like a bit of a cheat.
Any ideas on time out in either C# or Vb
Sadly this is not for a db connection this is not where the application is failing.
What about allowing just one instance of your application to run at the same time?
I guess you are scheduling runs: have a look at this code as a way of preventing multiple instances of your application without changing the scheduling.
Please, don’t abandon your Mutex… 😉
HTH