如何在特定日期和时间运行特定方法? [英] How to run a specific method on a specific date and time?
问题描述
我需要强制我的java应用程序在特定的日期和时间执行一些操作。情景如下:
1-用户设置特定的时间和频率(每天,每个月)
2-系统为请求
3-启动触发器一旦达到预定义的频率和时间
3.1 - 系统执行保存在方法中的所需操作
我发现这个答案,但无法使其工作。
一个例子值得赞赏。
调度程序框架可用于在指定的时间,间隔,周期性执行任务。 是常用的之一。 或简单地使用java ScheduledExecutorService I need to force my java application to perform a couple of actions on a specific date and time. The scenario is as following: I have found this answer but could not make it work. An example would be appreciated. There are multiple java scheduler frameworks available to do the tasks at your specified time, interval, periodicity. Apache quartz is one of the commonly used ones. or simply make use of java ScheduledExecutorService 这篇关于如何在特定日期和时间运行特定方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
1- user set a specific time and frequency (every day, every month)
2- system starts a trigger for the request
3- once that pre-defined frequency and time are reached
3.1 - system performs the required actions that are kept in a method