0

My condition is like that, i want a trigger to be fired every month on the date say 30, but the month February dosn't have this particular date ,so during execution will the quartz through a exception or it will execute that trigger on the day 28 for February.if it throws a exception then what will be the solution.

thnx.

STW
  • 44,917
  • 17
  • 105
  • 161
sanjib
  • 1
  • 3

1 Answers1

1

Try with this.

trigger = newTrigger() .withIdentity("trigger3", "group1") .startNow() .withSchedule(cronSchedule("0 0 15 L * ?")) .build();

// fire on the last day of every month at 15:00

Reffer this link

http://quartz-scheduler.org/documentation/quartz-2.x/cookbook/MonthlyTrigger

NPKR
  • 5,368
  • 4
  • 31
  • 48