Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to return a return value from Hangfire

Tags:

c#

hangfire

I noticed this field in the Hangfire Dashboard for a succeeded job:

enter image description here

I would love to shove some data in there, to give me more information about what the job did.

How would I do that?

I have searched google, checked the Hangfire documentation etc, but with no luck - probably because "result" is a very tricky keyword to search for in this context.

like image 916
Kjensen Avatar asked Mar 07 '26 07:03

Kjensen


1 Answers

The "Result" field displays the output/result your method returns.

You can return a string or object and Hangfire will convert it to JSON.

Your "Result" field contains a serialization error, Hangfire is failing to serialize the returned object but without any code I cannot help you further.

Please see example screenshots below.

Code: Result: Code: Result:

like image 163
Pieter Alberts Avatar answered Mar 09 '26 23:03

Pieter Alberts



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!