6

I am using Java - Spring - Quartz Scheduler. I want to run job by 3 AM in the morning and following is my cron expression.

0 0 3 * * ?

Can somebody tell me is it the correct one? Will it execute twice in 24 hour 3 PM and 3 AM?

informatik01
  • 16,038
  • 10
  • 74
  • 104
d-man
  • 57,473
  • 85
  • 212
  • 296
  • Yes this is correct, you can verify it by [this][1] [1]: http://stackoverflow.com/questions/4469276/convert-cron-expression-into-nice-description-strings-is-there-a-library-for-ja – jmj Dec 07 '12 at 20:46

2 Answers2

5

Yes this is correct, you can verify it by this, and it takes 0-23 for Hhour field so it will invoke at 3 am

Community
  • 1
  • 1
jmj
  • 237,923
  • 42
  • 401
  • 438
4

I have checked your expression in the CronMaker.

This only works for 3:00 AM every day. If you need for 3 AM and 3 PM, use this:

0 0 3/12 1/1 * ? *
ElderMael
  • 7,000
  • 5
  • 34
  • 53