0

I need to create a scheduled job that will occur after interval of each 10 days. But i am not sure what would be the written in the parameter of @Scheduled annotation of Spring. Can anyone define the cron expression for this job if i am using cron as an parameter in @Scheduled annotation or fixedDelay would be an better choice than cron?

Arun Kumar
  • 6,534
  • 13
  • 40
  • 67
  • 1
    It looks like exact duplicate http://stackoverflow.com/questions/1382634/how-to-set-cronjob-for-2-days – Alexey Ogarkov Aug 08 '12 at 09:01
  • Are the step values clever enough to handle months with 31 days and a leap year with 29 days in Feb. My understanding is that it would only fire on the 10th, 20th & 30th (if there is one) if the month value was */10. I think therefore the fixedDelay maybe a better option. – mrswadge Aug 08 '12 at 09:18
  • @mrswadge - Thanks for your answer. I got the solution to use fixedDelay by passing the total no of ms equivalent to 10 days to it. – Arun Kumar Aug 10 '12 at 10:52

0 Answers0