0

I want to schedule a task that runs every month on the 9th day at 11 AM.

I use this expression: "0 0 9 08 * *" but it not working.

But when I use "0 0 9 * * *". Then it runs at 9 AM every day.

2
  • I did not test but I would have written it as "0 11 9 * ?" Aug 2 at 16:42
  • @GaëlMarziou It requires 6 arguments. Aug 3 at 7:16

1 Answer 1

0

It should be "0 0 11 9 * ?"

  • 0 0 11 means 11:00:00 AM
  • 9 is the day of the month
  • * any month
  • ? any day of the week, could probably be also *

Official docs:

https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/scheduling/support/CronExpression.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.