Share job data between RecurringJobs

Hi all!

I was using Quartz with a repeating job. In Quartz, the data from the previous job execution is available for the next job execution. I have tried to achieve this behavior with Hangfire by using the following code:

performContext.SetJobParameter(“field”, 0);
int field = performContext.GetJobParameter(“field”);

Unfortunately, the data is lost between executions, thereby not meeting my requirements.

Is what I want possible with Hangfire?

You may either use a custom table, or built-in Hash/Set/List tables for that. To differentiate between recurring jobs, you may use RecurringJobId job parameter value, and use it as a part of the key to get/set values in those tables.

Thanks for the feedback, I went for the Hash table, and it works as intended. :grinning: