How to run every 25 seconds in Quartz scheduler?

前端 未结 7 2258
悲哀的现实
悲哀的现实 2021-02-12 23:37

I am using the Quartz Scheduling API for Java. Could you help me to run every 25 seconds using cron-expression. It\'s just a delay. It does not have to start always at second 0.

相关标签:
7条回答
  • 2021-02-13 00:06

    With Quartz 2.1.5 this will help:

    CronTrigger trigger = newTrigger()
        .withIdentity("trigger1", "group1")
        .withSchedule(cronSchedule("0/20 * * * * ?"))
        .build();
    
    0 讨论(0)
提交回复
热议问题