Long running intensive job


Can I use Hangfire from ASP.NET to run long intensive job?
The JOB run image processing algorithm which can run up to 1 hour.

Is this optional?

We have some jobs that can take 20 or 30 minutes so I would think even an hour is not an issue.

If the job runs often and you have 20 or 30 jobs that take an hour you may have issues.

Yes it should work, but be aware that if something happens to your website during that hour (site crashes, IIS restarts, whatever) then your job will be interrupted. You will need to make sure that the job can be restarted and continued, or be willing to live with the consequences of a failed job.

It would be safer to pass the job off to another server that is not dependent on IIS. You can still kick it off from your website, but it should run on a separate server in a separate process.

If you decide to stick with running it on the same server as your site, you’ll want to look closely at this page: