Aki T Aki T - 1 year ago 134
C# Question

Use Hangfire job id in the code

I'm doing a Fire-and-Forget method invocation like this.

BackgroundJob.Enqueue(() => SendEmail(name));

I would like to pass the job id to the SendEmail() method and use it inside the method.

Answer Source

The easy way is to set a filter class. Hangfire Forum topic Use Hangfire job id in the code.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download