I just want that my program or method should run at specific date and time. i have heard about Timer and TimerTask in java API. But don't know exactly how to use it.
If you want to run a java program at a specific time you probably want to look at the OS tools (like cron or at).
If you want to run a method inside of an already running java application then the ScheduleExecutorService, while it may be overkill, is pretty easy to use.
2.1m questions
2.1m answers
60 comments
57.0k users