Question

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

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top