# AddHangfireServer with additional processes

**URL:** <https://discuss.hangfire.io/t/addhangfireserver-with-additional-processes/10248>\
**Category:** question\
**Created:** [September 18, 2023, 12:34pm UTC](https://discuss.hangfire.io/t/addhangfireserver-with-additional-processes/10248 "2023-09-18T12:34:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsmith18](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@tsmith18](https://discuss.hangfire.io/u/tsmith18)\
**Post date:** [September 18, 2023, 12:34pm UTC](https://discuss.hangfire.io/t/addhangfireserver-with-additional-processes/10248/1 "2023-09-18T12:34:44Z")

</div>

I am getting started with Hangfire as a console app. When I start this I want to add an additional background process. I am using the SqlServerStorage.

```auto
private static void Main(string[] args) {
            var host = Host.CreateDefaultBuilder(args)
                .ConfigureAppConfiguration((ctx, cb) => ConfigBuilder(cb, args))
                .ConfigureServices((ctx, svcColl) => ConfigureServices(svcColl, ctx.Configuration))
                .ConfigureLogging(Configurelogging)
                .Build()
                .Run();
}

private static void ConfigureServices(IServiceCollection services, IConfiguration cfg) {
    var dbcs = cfg.GetValue<string>("ConnectionStrings:DB");
    _ = services.AddHangfire(gc => {
        _ = gc
            .UseSimpleAssemblyNameTypeSerializer()
            .UseRecommendedSerializerSettings()
            .UseSqlServerStorage(dbcs);
    });

    _ = services.AddHangfireServer(JobStorage.Current, new[] { new MyProcess { } });
}

```

The `AddHangfireServer` call throws an exception `: 'Current JobStorage instance has not been initialized yet.` which makes sense in this case. How do I get this process tied in so it runs in the background?

---

<div class="post-metadata">

**Author:** ![Denis\_Michael](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/denis_michael/32/3489_2.png) [@Denis\_Michael](https://discuss.hangfire.io/u/Denis_Michael)\
**Post date:** [September 28, 2023, 10:05am UTC](https://discuss.hangfire.io/t/addhangfireserver-with-additional-processes/10248/2 "2023-09-28T10:05:55Z")

</div>

Regarding error` Current JobStorage instance has not been initialized yet`,had you taken a look at this [Answer](https://discuss.hangfire.io/t/jobstorage-current-property-value-has-not-been-initialized/884/2)?
