Configure two Database for Hangfire in Single ASP.Net Core

sql-server
aspnetcore
Tags: #<Tag:0x00007f8b9a1410b8> #<Tag:0x00007f8b9a140e10>

#1

Is it possible to configure two Database for Hangfire from Single ASP.NET Core console application.


#2

What exactly is it you are trying to have two of?
You mean you want to monitor two Hangfire databases with the same Hangfire Dashboard?

A Hangfire Dashboard can only monitor one Hangfire database.

I guess you could alter the Hangfire Dashboard to handle more than one Hangfire database, but that is probably not simple and you would have to do it yourself. I have never heard or seen anyone having done this.


#3

I’m trying to schedule a jobs simultaneously for two Databases.
Basically I have two projects

  1. Gateway - ASP .Net Core Console application
  2. Pipeline - Web API.
    Both are using hangfire to schedule job have different Databases, But in some cases I need to have schedule job in gateway hangfire and pipeline hangfire from Gateway only.
    Is such thing possible?

#4

As far as I know Hangfire is annoyingly only designed to use static classes, so I doubt you can use two Hangfire setups at the same time. Might not be impossible, but I sure wouldn’t want to try it.

But I still aren’t totally sure what you are trying to do, and I can’t call myself anything near a Hangfire expert. I am mainly here to complain about #595 not being fixed yet.