ScheduledExecutorServiceを使用して、特定の時間に特定のタスクを毎日実行するにはどうすればよいですか?
毎日午前5時に特定のタスクを実行しようとしています。そこでScheduledExecutorService、これを使用することにしましたが、これまでに、数分ごとにタスクを実行する方法を示す例を見てきました。 また、毎日特定の時間(午前5時)にタスクを実行する方法と、夏時間の事実も考慮した例を見つけることができません- 以下は15分ごとに実行される私のコードです- public class ScheduledTaskExample { private final ScheduledExecutorService scheduler = Executors .newScheduledThreadPool(1); public void startScheduleTask() { /** * not using the taskHandle returned here, but it can be used to cancel * the task, or check if it's done (for recurring tasks, that's not * going to be …