While within method
public void Execute(PerformContext context), I would like to get data from storage associated with RecuringJob:
var jsonContextArguments = context.GetJobData();
Howewer if BackgroundJob I’m in was not created by RecuringJob,
context.GetJobData() throws generic Exception (https://github.com/icsharp/Hangfire.RecurringJobExtensions/blob/master/src/Hangfire.RecurringJobExtensions/RecurringJobInfoStorage.cs#L63).
Is there a way to find if BackgroundJob was created by RecurringJob, other than depending on UGLY comparison of thrown exception message?
Similar unanswered question here: Getting the RecurringJobId from a JobId in FilterAttribute