Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rcracel opened this issue Aug 7, 2020 · 0 comments

Comments

@rcracel
Copy link

rcracel commented Aug 7, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant