This post comes as a continues to the previous one. I thought about some insights regarding this issue and in the bottom line, there are some significant disadvantages that I could think about:
- Get from the starter point that web application is stateless, this is the most important disadvantage - you cannot rely on that admit it or not.
- What about performance - like the former post, this kind of alive (web) service will grab a thread permanently from the application pool and we'll use it - this thing damage in a matter of time the performance.
- What about IIS reset action. If being done, the process will be 'dead' and this thing is worth to nothing because we can't rely on anyone to check if it alive.
The main conclusion:
Don't count on web application in order to run scheduled tasks - you can't rely on it in 100% (however you have tools that meant to monitor it).
I takes Ken Egozi's comment of creating a scheduled task (instead of windows service) that will do the scheduled job (I going to keep my local machine alive forever I think ;))