Cron Expression - Starting at specific day/time and repeating till end of year

1.4k Views Asked by At

I want to write a cron expression which does the following -

Starting every last Sunday of September at 9:00 am and repeating every 3 weeks till end of the year.

I have come up with

0 0 9 ? 9 6L

How can i make this repeat every two weeks till end of the year.

Thanks in advance

1

There are 1 best solutions below

3
On BEST ANSWER

There is no way to do that using cron. I suggest you to run your script every day using

0 0 9 * 9-12 ? 2013

And inside your script check if it is a right time to execute. If it is not then exit immediately.