Run a program or method at specific time in Java
问题 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. 回答1: 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: If this is for your own benefit and not for a