Add jobs by a service which isn't processing them

Is it possible to add jobs by a service which itself isn’t processing jobs?

It would be even better if this service woudln’t need to have the code which will be executed for example by adding it with a string instead of a reference.

Thanks and kind regards
CrazyOrange

Of course! You can call BackgroundJob.Enqueue without starting up a BackgroundJobServer

The caveat is that you definitely need to have the method to reference when enqueuing the job. So, no, that won’t work.

When folks ask if hangfire needs the code for the job its enqueueing, I always wonder, maybe you need a message broker or a different queue instead. Hangfire is for distributed job processing within your specific application.