Details

    • Type: New Feature New Feature
    • Status: New
    • Priority: 2 Major 2 Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2
    • Fix Version/s: 3.0
    • Component/s: Triggers
    • Labels:
      None
    • Terracotta Target:
      Pending

      Description

      Quartz scheduler does provide the creation of a trigger by cronSchedule like this:

      trigger = newTrigger()
          .withIdentity("trigger3", "group1")
          .startNow()
          .withSchedule(cronSchedule("0 0 15 ? * WED")) // fire every wednesday at 15:00
          .build();
      

      Because it is not possible to represent every recurrence rule of triggers by CronTrigger as described in http://www.quartz-scheduler.org/documentation/quartz-2.1.x/cookbook/BiDailyTrigger it would be nice to have support for rfc2445 format that should cover every possible rule. Please have a look at tools.ietf.org/html/rfc2445#section-4.3.10 for further information.

      Example:

      trigger = newTrigger()
          .withIdentity("trigger3", "group1")
          .startAt(todayAt(15, 0, 0))     //  at 15:00
          .withSchedule(rfcSchedule("RRULE:FREQ=WEEKLY;BYDAY=WE")) // fire every wednesday
          .build();
      

      Concerning persistence of a trigger, it also would be useful to have an export to rfc2445 format.

      1. quartz-rfc5545_20131212.zip
        38 kB
        Olivier Queyrut
      2. quartz-rfc5545_20131212.zip
        38 kB
        Olivier Queyrut
      3. quartz-rfc5545_20131213.zip
        38 kB
        Olivier Queyrut
      4. quartz-rfc5545.zip
        37 kB
        Olivier Queyrut
      5. quartz-rfc5545.zip
        35 kB
        Olivier Queyrut

        Activity

        Hide
        Chaitra Suresh added a comment -

        Hi,

        There is a getTimesTriggered() on a SimpleTrigger. But I don't see such a method on RecurrenceTrigger. I want to know exactly how many times a recurrence rule trigger fired. Is there a way to find that out?

        Thanks,
        Chaitra

        Show
        Chaitra Suresh added a comment - Hi, There is a getTimesTriggered() on a SimpleTrigger. But I don't see such a method on RecurrenceTrigger. I want to know exactly how many times a recurrence rule trigger fired. Is there a way to find that out? Thanks, Chaitra
        Hide
        Olivier Queyrut added a comment -

        Hi,
        Currently there is no way to get the number of times the trigger has fired. This is probably a feature that lacks... but I can't implement it right now.

        Probably, it would also be useful to extend the RecurrenceRuleTrigger behavior upon a mis-fire situation, such as MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT, MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT, MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT, MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT. This is not so easy to do with the current implementation of RecurrenceRule.

        As soon as I have time, I take a look at it !

        Regards,
        Olivier

        Show
        Olivier Queyrut added a comment - Hi, Currently there is no way to get the number of times the trigger has fired. This is probably a feature that lacks... but I can't implement it right now. Probably, it would also be useful to extend the RecurrenceRuleTrigger behavior upon a mis-fire situation, such as MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT, MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT, MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT, MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT. This is not so easy to do with the current implementation of RecurrenceRule. As soon as I have time, I take a look at it ! Regards, Olivier
        Hide
        christopher dieringer added a comment -

        Hi all:

        I'm late to the game! Does someone in the above conservation have what they feel to be a ~~stable utility to input RRULEs & trigger events? I will check out the .zip and provide any feedback I can. If it's stable, Olivier, any hold up on getting a Pull Request moving?

        Thx!

        Chris

        Show
        christopher dieringer added a comment - Hi all: I'm late to the game! Does someone in the above conservation have what they feel to be a ~~stable utility to input RRULEs & trigger events? I will check out the .zip and provide any feedback I can. If it's stable, Olivier, any hold up on getting a Pull Request moving? Thx! Chris
        Hide
        christopher dieringer added a comment -

        It looks like the test suite does not work full well--there is some timezone mismatching in the assertions.

        for instance:

        ```
        FREQ=SECONDLY;COUNT=5
        "2013/01/01 12:00:00 PST",
        org.junit.ComparisonFailure:
        Expected :2013/01/01 03:00:00 PST
        Actual :2013/01/01 12:00:00 PST
        ```

        Show
        christopher dieringer added a comment - It looks like the test suite does not work full well--there is some timezone mismatching in the assertions. for instance: ``` FREQ=SECONDLY;COUNT=5 "2013/01/01 12:00:00 PST", org.junit.ComparisonFailure: Expected :2013/01/01 03:00:00 PST Actual :2013/01/01 12:00:00 PST ```
        Hide
        christopher dieringer added a comment -

        much of the test data assumes a particular users TZ (Europe/XYZ). Setting the JVMs TZ to different values strongly affects the tests.

        Show
        christopher dieringer added a comment - much of the test data assumes a particular users TZ (Europe/XYZ). Setting the JVMs TZ to different values strongly affects the tests.

          People

          • Assignee:
            James House
            Reporter:
            Philip Weber
          • Votes:
            8 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated: