[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
How to repeat a job by day interval?????  XML
Forum Index -> Quartz
Author Message
skraana

neo

Joined: 05/16/2012 00:02:41
Messages: 6
Offline

Hi..,

pls find the below code.

String cronExpression = "0 10 5 15/2 * ? *";
CronTrigger cronTrigger = new CronTrigger("a","b",cronExpression);
cronTrigger.setStartTime(may 15th);
cronTrigger.setEndTime(june 10th);

i want to run a job which repeats every 2 days starting from may 15th. Currently it is running in the following order.
May - 15,17,19,21,23,25,27,29,31
June - 15,17,19,21,23,.... and so on.

but i want to start from 1st of next month (i.e 1st of june not from 15th of june).

so what should i do to run the job in the following order?
May - 15,17,19,21,23,25,27,29,31
June - 1,3,5,7,9,11,13,15,17,19,21,23,.... and so on.

(Note : i have to use only cron trigger not the simple trigger.)

Thanks
SK Raana
jhouse

seraphim
[Avatar]
Joined: 11/06/2009 15:29:56
Messages: 1654
Offline

You can't do that with cron trigger. there are other trigger types that can do it.
skraana

neo

Joined: 05/16/2012 00:02:41
Messages: 6
Offline

Could you please give me an solution for the above problem????????

Thanks in advance.. :) :)

-
SK Raana

 
Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team