I need to make a Thread which starts it’s work at the time the program runs and dies when the program is closed. this Thread is going to check something every 1 minute ones.
what is the best way for this scheduling, using Thread.sleep() or using a Timer or what?
You’ve not provided any code, but there’s loads of examples about for this sort of thing, here’s one:
http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ScheduledExecutorService.html#scheduleAtFixedRate(java.lang.Runnable