Hangfire Discussion

How to detect if a recurring job is running because of a manual trigger

recurring
Tags: #<Tag:0x00007f84ff7ad998>

#1

Hello,

I have a recurring job that runs on a set schedule, but that may also need to be executed/triggered in an ad-hoc way by the user. I need to record in my database whether the trigger for the job was the recurring hangfire role, or a user trigger. Is there any way to tell from within the executing code what the source of the job was?

Thanks!

John