Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring cron expression for 3 AM

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?

like image 945
d-man Avatar asked Dec 07 '12 20:12

d-man


Video Answer


2 Answers

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

like image 60
jmj Avatar answered Sep 18 '22 15:09

jmj


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 * ? *
like image 34
ElderMael Avatar answered Sep 20 '22 15:09

ElderMael