Skip to content

CronTrigger.getTriggerBuilder() changes misfire instruction from "ignore misfire" to "smart" #505

Closed

Description

@wrwatson

The method original.getTriggerBuilder() should return a trigger builder with all fields set the same as on original. However, the misfire instruction is not always set in the builder correctly.

The following code shows the issue:

    @Test
    public void testClone()
    {
        final CronTrigger original = TriggerBuilder.newTrigger()
                .withSchedule( CronScheduleBuilder.dailyAtHourAndMinute( 10, 0 )
                                                  .withMisfireHandlingInstructionIgnoreMisfires() )
                .build();
        final CronTrigger clone = original.getTriggerBuilder().build();

        System.out.println( "original=" + original.getMisfireInstruction() );
        System.out.println( "clone   =" + clone.getMisfireInstruction() );
    }

I would expect the value returned by getMisfireInstruction() to be the same for both triggers. However, clone has a the misfire strategy of 0 (Smart).

Activity

  1. added 2 commits that reference this issue on Oct 14, 2019
    2943bd1
    b51abe9
  2. self-assigned this
    on Oct 14, 2019
  3. added a commit that references this issue on Oct 14, 2019
    32c6f84
  4. wrwatson commented on Oct 14, 2019

    @wrwatson
    Author

    That was quick. Thankyou @jhouserizer and @chrisdennis

    When is this likely to be published in a release?

  5. chrisdennis commented on Oct 15, 2019

    @chrisdennis
    Contributor

    Most likely some time this week.

  6. added a commit that references this issue on Oct 23, 2019
    8ab547f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions