I have a method that I want to run in the background called GenerateDocument. I only want this to try to run for xx seconds before giving up. Is there a way to do this with Hangfire?
so in my method declaration I would have:
public int GenerateDocument(IDocumentSettings settings)
//my method stuffs here
Is there something that I can specify that i only want it to run for so many seconds and then have the CancellationToken throw an exception?