Jernej Novak
Jernej Novak

Reputation: 3283

Url.Action inside Hangfire job

I have some recurring jobs created with Hangfire and inside these jobs I would like to use Url.Action. It is possible? Or do I have to manually create URLs.

Upvotes: 3

Views: 1860

Answers (1)

Erick Smith
Erick Smith

Reputation: 930

Hangfire happens outside the context of the site so it won't know the Url.Action. They recommend to pass it in as a parameter.

Upvotes: 1

Related Questions