Using a advanced Cron Expression show error when attempting to create new scheduler item

Issue #163 closed
AndreH created an issue

I am attempting to create a new repeating item with the following:

0 0 12 1/14 * 2 *

At 12:00 PM, every 14 days, only on Tuesday

When I attempt to save the item it errors out with

Incorrect cron expression!

Plugin version: 3.3.2 (JIRA 6.4.13)

Comments (4)

  1. Łukasz Modzelewski

    Hi,

    unfortunately it is not possible - cron expressions don't allow to create a bi weekly expressions (or even every 2 days) http://www.quartz-scheduler.org/documentation/quartz-2.x/cookbook/BiWeeklyTrigger.html

    If you follow the link you will see there is a tip to use SimpleTrigger or CalendarIntervalTrigger - but its not supported - I will add this to our back log as an improvement but it could be very hard thing to do because this depends on Quartz implemented in JIRA.

    You could try to find some walk around and schedule it differently, maybe every 1st and 3rd Tuesday of the month would work for you '0 0 12 ? 1/1 TUE#1 ' and '0 0 12 ? 1/1 TUE#3 ' (or something like '0 0 12 1/16 * ? *' - it would give you 2 tasks each month - but without specific day).

    You can test your cron expressions here: http://www.cronmaker.com/

    best regards,

    Łukasz

  2. AndreH reporter

    Hi,

    So it's not possible to use the Start Date as the reference point to create a new item every 2 weeks from that starting date?

  3. Łukasz Modzelewski

    Unfortunately it's not possible. Cron expressions use number of days in the month. You can check the upcoming issues using this cron expression: '0 0 12 */14 * ?' it would trigger in days like 1,15,29 and then start back from the day 1.

  4. Log in to comment