Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

716
Visualizações
System.InvalidOperationException: Recurring job can't be scheduled

I have this api endpoint which run C# hangfire.

RecurringJob.AddOrUpdate<IIngestService>(x => x.Process("ABC"), cronExpression, TimeZoneInfo.Local);
RecurringJob.AddOrUpdate<IIngestService>(x => x.Process("XYZ"), cronExpression, TimeZoneInfo.Local);

Problem is it always run Process("XYZ") only. Then I figure that I have to include recurringjobid if the method name are the same.

RecurringJob.AddOrUpdate<IIngestService>("ABC", x => x.Process("ABC"), cronExpression, TimeZoneInfo.Local);
RecurringJob.AddOrUpdate<IIngestService>("XYZ", x => x.Process("XYZ"), cronExpression, TimeZoneInfo.Local);

When I run the job manually from HangFire web, it works without error. But, when hangfire scheduler starts the job automatically after one minute (My cron job is * * * * *), it breaks.

The error message is:

System.InvalidOperationException: Recurring job can't be scheduled, see inner exception for details. ---> Hangfire.Common.JobLoadException: Could not load the job. See inner exception for the details. ---> System.TypeLoadException: Could not load type 'xxx.IIngestService' from assembly 'xxx.Service, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.Reflection.RuntimeAssembly.GetType(QCallAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive, ObjectHandleOnStack assemblyLoadContext)

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda