Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
スケジューラを使用して2分ごとに実行します。しかし、私は使用できません2m30s。助けてください
2m30s
SchedulingPattern pattern = new SchedulingPattern("*/2 * * * *");
SchedulingPattern の開始後、30 秒待つことができます。
Scheduler scheduler = new Scheduler(); scheduler.schedule("*/2 * * * *", new Runnable() { @Override public void run() { Thread.sleep(30*1000); foo(); } };); schedule.start();