javaexpressionquartz-schedulercronexpression

Quartz Scheduler: Schedule job on second last day of month


I need to run a job on the second and/or third last day of a month (e.g. 30.05.2013, 29.06.2013, 30.07.2013).

I know that I can run a job on the last day of month using for example

    0 0 9 L * ?

What I need is something like

    0 0 9 L-1 * ?

Is there any "inbuild" option for this kind of scheduling that I am missing?

If so, how to use it?


Solution

  • Try this:

    0 15 10 L-2 * ?
    

    I think it will help you. For reference use this quartz's official documents . Here every thing is given in detail.

    For verification of next fire time pliase use this link.