Scheduling tasks to run once, using the Spring task namespace

前端 未结 4 1860
暗喜
暗喜 2020-12-25 15:26

I\'m setting up a scheduled tasks scheme in spring, using the task namespace.

I want to schedule most tasks to fire according to a cron expression, and some to fire

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-25 15:43

    This works and is way easier than the other answers.

        // Will fire the trigger 1 + repeatCount number of times, start delay is in milliseconds
        simple name: 'mySimpleTrigger', startDelay: 5000, repeatCount: 0
    

提交回复
热议问题