Skip to content

The trigger configuration stored in the database is reset after application restart #111

@rcracel

Description

@rcracel

Howdy!

I have a feeling there is something simple I am missing here, but I have a set of jobs that I allow users to modify the triggers at runtime on the application. This really works well, and I can see that the updated cron expression get stored in the database as well as updated on the job itself.

My challenge is that when my application restarts, Quartz takes the trigger configuration defined in the job itself and overrides (updates) the value previously stored in the database. For instance, I have a job where I define a trigger as follows...

static triggers = { cron cronExpression: '0 15 * ? * * *' }

If I update that expression during runtime, it gets propagated correctly to the database... let's say I replace the expression with '0 20 * ? * * *' and check the database for the correct value. All is good until I have to restart the application.

Once the application restarts I see both the database and the job itself contain the original '0 15 * ? * * *' expression, whereas I expected the previously persisted value to win.

Metadata

Metadata

Assignees

No one assigned

    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