question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Quartz 3.2.x won't read from appsettings.json

See original GitHub issue

Describe the bug

Configuration section "Quartz" is not applied

Version used

latest 3.2.3

To Reproduce

Expected behavior

Documentation mentioned that the section "Quartz" in appsettings.json will be applied automatically.

Additional context

I have read the source code and it seems that starting from release 3.2.x, the extension method AddQuartz from Quartz.Extensions.DependencyInjection doesn’t touch the section "Quartz", it does in 3.1.0 though.

PR #878 added the feature in (for issue #877) but this PR #978 removed it (for issue #955)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mrducnguyencommented, Nov 18, 2020

I had a closer look. It’s not really straight forward to automatically load the config section "Quartz" from appsettings.json. It’s not possible to access IConfiguration from IServiceCollection, will need to pass IConfiguration as parameter

The current way of doing thing, users of the library can actually configure a section of their choice for Quartz, doesn’t have to be "Quartz"

I think I’ll settle with this

    services.Configure<QuartzOptions>(config.GetSection("Quartz"));
    services.AddQuartz();
1reaction
mrducnguyencommented, Nov 18, 2020

Thanks for your quick response.

The release notes and the documentation gave impressions that "Quartz" section will be loaded automatically 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Net Core Worker Service appsettings.json not being read
I created a .net core worker service, had IConfiguration injected into it so I can read a property from appsettings.json but everytime I...
Read more >
Microsoft DI Integration | Quartz.NET
Hosting allows you to have a background service for your application that handles starting and stopping the scheduler. Example appsettings.json.
Read more >
Untitled
Net Core appsettings.json best practices - Stack Overflow Quartz 3.2.x won Web7 feb 2010 · to Quartz.NET I forget where I found this...
Read more >
All configuration options
AWS Lambda Type Default AWS Lambda Common Type Default AWS Lambda Gateway REST API Type Default Agroal ‑ Database connection pool Type Default
Read more >
reading arrays of objects from appsettings.json
I am able to read single properties of objects however i cant read the whole array at once. Preferably i'd like to parse...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found