Can I use hangfire in this scenario?


I am pretty new to hangfire. Have used it for very simple things like a recurring job and very basic one shot jobs.

Now I have some more “custom” behaviours that I need to implement but don’t really know if I can use it hangfire this way from the doc or I must implement my own system. This are my requirements:

  1. I need a serial job queue. I mean, just one job must be executed at a time and then when finished the next one will start
  2. Jobs need to have a priority (this is something I haven’t found in the doc). What I mean is: It could be that while I’m executing a job I would like to add some other jobs that will have to be executed as soon as the current job finishes because they will have a higher priority over all other queued jobs.
  3. Is it possible for a job that has finished executing queue itself with different params? Or would this lead to any race condition?

Thanks in advance.


  3. There won’t be a race condition with hangfire as for hangfire it is a new job.