Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm a little stuck here trying to get Hangfire calling a service.
How do I inject til RitzauService correctly ?
I'm using cultivhangfire package
Just thought I Had it.. But this didn't work..
I am not sure if I understand correctly what you are trying to do, but this is the way I implemented a custom service to be used by Hangfire:
public class HangfireTasksComposer : IComposer
public void Compose(IUmbracoBuilder builder)
RecurringJob.AddOrUpdate<IRitzauService>(x => x.SyncRitzau(null), Cron.Daily());
public interface IRitzauService
void TaskToPerform(PerformContext context);
public class RitzauService : IRitzauService
public void SyncRitzau(PerformContext context)
// Perform the task
I hope this is any help.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted