0

I am working on job schedule in Spring app. I want to stop job execution. So, Can someone help me to provide CRON expresssion for the same.

I have tried few links in googling but as there is no year field(Which is available in other CRON like Unix etc) in the SPRING CRON expression, we can not give previous year to disable the same.

I can comment OR remove bean code, that will disable it BUT my requirement is to achieve the same via spring CRON expression.

Thanks in Advance.

quartz..cron=0/90 * * * * ?

  • 1
    Does this answer your question? [Spring Cron scheduler “disable pattern”](https://stackoverflow.com/questions/36403671/spring-cron-scheduler-disable-pattern) – M. Justin Jan 09 '20 at 18:45

2 Answers2

1

This webpage helped me for all my cron needs on my schedulers: Cron Maker

I don´t get how often you want your tasked to be performed but in anycase, hopefully the web page helps you.

José Ripoll
  • 504
  • 1
  • 7
  • 17
1

'The special value "-" indicates a disabled cron trigger, primarily meant for externally specified values resolved by a ${...} placeholder', according to the javadoc. I am using the 'cron' property of @Scheduled, so I don't know if this applies to your implementation.

Christian Meyer
  • 605
  • 8
  • 15