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
|