Spring-Boot one @Scheduled task using multiple cron expressions from yaml file

后端 未结 2 1575
孤城傲影
孤城傲影 2021-02-11 00:19

I like to have an implementation of one @Scheduled job using different configuration properties of .ymlfile.

Means in my yaml file I describe

2条回答
  •  误落风尘
    2021-02-11 00:28

    A trick related to it: while defining the corn job timing, attribute name should be in lower case

    for example: if it is in Camel case, spring did not kick the job :( application.yml:

    common: scheduler: feedeErrorLogCleanUp: 0 0/5 * ? * *

    WHEREAS BELOW STUFF WORKS

    common: scheduler: feedeerrorlogcleanUp: 0 0/5 * ? * *

提交回复
热议问题