We are leaving Russia. We are against aggression and war with Ukraine. It is a tragedy for our nations, it is a nightmare

Multiple injection of the same interface problem

I have multiple injection of the same interface IBootOptions in my project to get the different options for the recurring jobs where we can set an Action called LongRunningFunction

services.AddTransient<IBootOptions>(s => new BootOptions
{
 LongRunningFunction = () => s.GetService<IMyService>().RetrieveTitleList()
});

services.AddTransient<IBootOptions>(s => new BootOptions
{
 LongRunningFunction = () => s.GetService<IMyService>().RetrieveSubTitleList()
});

I got a class Bootable that implement a method that will execute the LongRunningFunction when the recurring job are triggered

public  class Bootable : IBootable
{
    public Bootable(IBootOptions bootOptions)
    {
        BootOptions = bootOptions;
    }

    public void Execute()
    {
        BootOptions.LongRunningFunction();
    }
}

and finally in the startups, I declare all the recurring job

public void Configure(IServiceProvider serviceProvider)
{

    foreach (var bootOptions in serviceProvider.GetServices<IBootOptions>())
                recurringJobManager.AddOrUpdate(bootOptions.Job.Identity,
                    () => new Bootable(serviceProvider.GetService<IAuditLogEntryProvider>(),
                        serviceProvider.GetService<IAuditLogAdapter>(), bootOptions).Execute(), bootOptions.Job.CronSchedule);
}

My problem is that when the recurring job are triggered, the bootOptions is always the last injected bootOptions. So in my example the LongRunningFunction RetrieveSubTitleList will be executed two times and the RetrieveTitleList will never be executed. Hangfire recreate the Bootable object when it is triggered and the injected bootOptions is always the last. Is there a way to avoid hangfire to recreate the Bootable object when the recurring jobs are triggered ?