Using EJB Timer Service

后端 未结 2 1877
迷失自我
迷失自我 2021-01-02 22:08

I have a small bit of code that I\'m trying to execute with the timer service.

I\'m having trouble finding a good example or tutorial online. Oracle\'s tutorial cov

2条回答
  •  情话喂你
    2021-01-02 22:35

    If you want your timer to run every hour, containerise the hour using day of the week. Here is an example

    @Schedule(dayOfWeek = "*", hour = "*/1", persistent = false)
    public void run() {
        // Do your job here.
    }
    

提交回复
热议问题