Let me start by saying that I use two different projects that use hangfire and share the same database.
Each project has its own queues so that when the jobs start they go to the aforementioned queues. My problem is this I have scheduled two recurring jobs that start every day on one of the two projects which go to the designated queue for the project. The problem is that these jobs don’t start every morning and hangfire in the dashboard tells me “could not load the job see inner exception”. If I start the job from the console this works perfectly.
I read that there are problems if two projects work on the same db? The plans are on Azure and the machines are always running.
Have a look at the Hangfire Dashboard and confirm that the failed Scheduled Background Job is being enqueued on the Hangfire Queue you expect and is executing on the Hangfire Server/Project you expect. I would bet they’re being queued to default and running on the wrong machine/process.
When you say “starting the job from the console” what do you mean?
The recommended approach would be to utilize the same database with a different SQL schema, then use the SqlServerStorageOptions.SchemaName property when you specify your storage options during Hangfire Configuration: https://docs.hangfire.io/en/latest/configuration/using-sql-server.html#configuration
I mean that I enter in the dashboard and i manually trigger the job.
The problem is the recurring job didn’t running and every time in “recurring job” dashboard i see the error( in execution column) “could not load the job see inner exception”.
I remember that the job is scheduled to start once a day.
However I can confirm that the recurring job that is related to the other project and use another queue always starts, it’s strange why this one start on this project and queue but the other two recurring job on the different project and queue doesn’t start??
I’ll try to use same database but with different SQL schema!