# In .Net Core Read appsettings value within an enqueued or recurring job

**URL:** <https://discuss.hangfire.io/t/in-net-core-read-appsettings-value-within-an-enqueued-or-recurring-job/3783>\
**Category:** question\
**Tags:** recurring, dotnetcore\
**Created:** [September 11, 2017, 3:56pm UTC](https://discuss.hangfire.io/t/in-net-core-read-appsettings-value-within-an-enqueued-or-recurring-job/3783 "2017-09-11T15:56:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![VikasCh](https://avatars.discourse-cdn.com/v4/letter/v/bc8723/32.png) [@VikasCh](https://discuss.hangfire.io/u/VikasCh)\
**Post date:** [September 11, 2017, 3:56pm UTC](https://discuss.hangfire.io/t/in-net-core-read-appsettings-value-within-an-enqueued-or-recurring-job/3783/1 "2017-09-11T15:56:36Z")

</div>

We have been using hangfire for all our background tasks and have a scenario where we would need to read certain values from the appsettings.json file to continue with the job process. Since the HttpContext object is not available, we are not able to get the values from there.

Is there a way to read the appsettings.json file during the execution of the recurring or enqueued job?

Thanks much in advance.

---

<div class="post-metadata">

**Author:** ![pieceofsummer](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/pieceofsummer/32/785_2.png) [@pieceofsummer](https://discuss.hangfire.io/u/pieceofsummer)\
**Post date:** [September 11, 2017, 7:21pm UTC](https://discuss.hangfire.io/t/in-net-core-read-appsettings-value-within-an-enqueued-or-recurring-job/3783/2 "2017-09-11T19:21:38Z")

</div>

You can just pass required configuration value as a job argument, or inject `IConfiguration` service in job class constructor and access it from the job method.
