How to implement background processing for ASP.Net MVC website in a shared hosting environment?

前端 未结 4 1159
旧时难觅i
旧时难觅i 2021-02-01 08:45

I am developing my first web application using ASP.Net MVC, and I am in a situation where I would like a background service to process status notifications outside of the applic

4条回答
  •  Happy的楠姐
    2021-02-01 09:05

    also take a look at this Simulate a Windows Service using ASP.NET to run scheduled jobs article.

    it explains a nice way to schedule operations with no outer dependence.

    The idea is to use Cache timeout to control the schedule. I've implemented it successfully on a project which required regular temp file cleaning. This cleaning is a bit heavy so we move this clean operation in a scheduled job (using the asp.net cache) to avoid having to deploy scheduled task or custom program.

提交回复
热议问题