Skip to content

setCronExpression method not exposed in CronTriggerBean [SPR-8556] #13200

Closed

Description

@spring-projects-issues

Greg Lively opened SPR-8556 and commented

The CronTriggerBean does not expose the setCronExpression() method. It looks like the Spring CronTriggerBean should extend the QUARTZ CronTriggerImpl, not the QUARTZ interface?? of CronTrigger, which only contain 4 getter methods. I have no idea where it would get access to setCronExpression any other way.


Affects: 3.1 M2

Issue Links:

Activity

  1. spring-projects-issues commented on Jul 25, 2011

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    This is an effect of Quartz 2.0's rearchitecture of its core APIs which breaks quite a bit of Spring's traditional Quartz support. As a consequence of that, up until Spring 3.1 M2, Spring is only fully compatible with Quartz 1.x.

    As of Spring 3.1 RC1 (scheduled for release in August), we officially support Quartz 2.0 next to Quartz 1.5+ now: see #12923. Hoever, CronTriggerBean, SimpleTriggerBean and JobDetailBean do not work against Quartz 2.0: They are marked as only compatible with Quartz 1.x now.

    With Spring 3.1 and Quartz 2.0, we recommend use of the native Quartz 2.0 JobDetailImpl etc classes or of Quartz 2.0's corresponding builder APIs. This should work nicely in Spring 3 @Bean methods, populating SchedulerFactoryBean's "triggers" and "jobDetails" properties.

    Note that you may also @Inject the Scheduler in any application component and schedule jobs using the native schedule methods there, for example in your @PostConstruct methods. That way, programmatic scheduling can be used for such 'static' registration of triggers and jobs as well.

    Juergen

  2. added
    type: bug
    status: declined
    in: core
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: corestatus: declined

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions