Call a method at fixed time in Java

后端 未结 3 757
-上瘾入骨i
-上瘾入骨i 2020-12-30 18:15

How do I call a method at a particular time?

For example to call the method at 6:00 and 13:00.

I\'m working at a desktop application for Windows.

3条回答
  •  攒了一身酷
    2020-12-30 18:52

    An alternative to to use Quartz. It's effectively the same as Timer or TimerTask, but it does allow for a description of what must run using a cron style syntax.

提交回复
热议问题