I have a job scheduled via Quartz and a CRON Expression. The goal of my CRON expression is to run every 10 minutes every day between Monday and Friday between 08:00 AM and 20:00 PM and looks like this:

0 0/10 8-19 ? * MON-FRI

My execution log looks like this:

2010-02-24 19:10:00,140 INFO  - Start
2010-02-24 19:20:00,015 INFO  - Start
2010-02-24 19:30:00,015 INFO  - Start
2010-02-24 19:40:00,015 INFO  - Start
2010-02-24 19:50:00,000 INFO  - Start //Execution expected at 20:00 PM
2010-02-25 08:00:00,000 INFO  - Start
2010-02-25 08:10:00,000 INFO  - Start
2010-02-25 08:20:00,000 INFO  - Start
2010-02-25 08:30:00,000 INFO  - Start
2010-02-25 08:40:00,000 INFO  - Start
2010-02-25 08:50:00,000 INFO  - Start
2010-02-25 09:00:00,000 INFO  - Start
2010-02-25 09:10:00,000 INFO  - Start

I would like that my CRON expression will fire my job at 20:00 PM. Question: Can this be accomplished using one CRON expression? which one?

Thank you very much in advance

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

Why should it run at 20:00? You specify that the hour should be 8-19, so 20:00 doesn't match that. I am not sure if there can be a single line cron expression to accomplish your needs, but you could easily add a line

0 0 20 * * ...

in addition to the existing one, that should do the trick.

link|improve this answer
Thanks for your reply, actually my "workaround" is just using two cron expressions. My question is just for improving my skills. – SourceRebels Feb 25 '10 at 10:11
feedback

How to specify a corn that we get triggered every four hours?????

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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