Quartz Cron expression :Run every 15 days ie twice in a month

前端 未结 4 1954
小蘑菇
小蘑菇 2021-01-02 13:15

I want to set the scheduler with a quartz cron expression which will trigger every 15 days ,for example 1st and 15th of every month.The 0 15 10 15 * ? is triggering only on

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-02 13:56

    You just need to append 1 with a comma to your expression at 'Day of Month' block.

    Rest is fine !

    0 15 10 1,15 * ?

    This will schedule to run every 1st and 15th day of the month and 10:15 am.

提交回复
热议问题