Answer the question
In order to leave comments, you need to log in
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
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.
as an option - put in the scheduler a task to open the browser with the desired action
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 questionAsk a Question
731 491 924 answers to any question