We left Russia. We are against aggression and war with Ukraine. It is a tragedy for our nations, it is a nightmare

Advice/guidance on Hangfire

I am new to Hangfire and would like to seek advice/guidance to a scenario I have.
I have a requirement to periodically (like every minute) call an external web service. This web service will return a list of transactions (sometimes as high as 200),
which I am expected to iterate through and save each item in my database, after a series of validations. After succesful save in database, i will make another call to
another werb service per each transaction.
From the little I have read about Hangfire, I have two approaches in mind
Approach 1 - I can handle
Schedule a recurring job that will call a method. This method will handle the process of making a call to the external web service, iterate through the list of transactions,
save in database and call second web service for each transaction.

Approach 2 - Don’t know how to do, so will need guidance
Schedule a recurring job that will call a method. This method will make a call to external web service, iterate through the list of transactions and CREATE A FIRE-AND-FORGET
JOB FOR EACH TRANSACTION dynamically. Each dynamic job will save the transaction in database and call second web service, after which it’s disposed/forgotten

Please advice me on which approach is best

One approach isn’t better than the other.

The first approach will use less resources as it’s only making one connection to the database. The second approach is more of a unit-of-work model and would be better for scaling. Many jobs can be handled simultaneously with multiple worker threads and even across multiple servers.

If you don’t know how to implement the second option and you don’t have requirements for it, I would go with the first option. If the job needs to perform faster in the future you can split the job into two and go with the second option.