How to configure Scheduler to run at last day of a month and

I have to configure a scheduler to run on last day of every month at 11.59pm. I know how to configure on a particular date of a month. Here the problem it the day varies Jan has 31 days, feb has 28 day…

Any help will be greatly appreciated

Thanks
Jay

I suggest you need three tasks:

a: 31 Jan, Mar, May, Jul, Aug, Oct, Dec
b: 30 Apr, Jun, Sep, Nov
c: 28 Feb (29 Feb in a leap year)

Simple but effective.
Best regards.

More complicated would be to run the service every day but check another Java service to see if it is the last day. Something like this might help . . .

java.util.GregorianCalendar gc =
new java.util.GregorianCalendar();
if (gc.get(Calendar.DAY_OF_MONTH) ==
gc.getActualMaximum(Calendar.DAY_OF_MONTH)) {
// do something
} else {
// wait till later
}