B
B
BristlyStarling2016-06-06 13:47:20
ASP.NET
BristlyStarling, 2016-06-06 13:47:20

How to make long running tasks repeat in ASP.NET?

You need to make a call to a certain method every minute. First I did it through Threading.Timer and App_Start.
So the problem is that some time after the call, the module stops working if you do not call it. It turns out that IIS "unloads" the application. How can I run a background process for a long-term repetition?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
mpavlov, 2016-06-06
@mpavlov

Most likely, you need to do this:
IIS Settings -> Pool Settings -> StartMode - AlwaysRunning
As a result, the application will always work, and not only on demand / request. There are also other settings: the time spent in standby mode (Idle-Timeout), the restart cycle (Recycling).
And it is better to drink win-service. And it will work more beautifully, and you will get useful knowledge.

V
VitGun, 2016-06-06
@VitGun

as an option - put in the scheduler a task to open the browser with the desired action

V
Viktor Buzin, 2016-06-09
@Buzzz

There are two options here:
Both options are good, but the second one is simpler and without hemorrhoids.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question