ASP.NET MVC Repeating Task

后端 未结 2 927
一个人的身影
一个人的身影 2021-01-03 04:17

I need to run a task repeatedly on an ASP.NET MVC site; it needs to run every time interval (Interval doesn\'t matter).

I achieved this by setting a backgro

2条回答
  •  有刺的猬
    2021-01-03 04:46

    I know you've stated that:

    This needs to run in the MVC site

    However I think this is the wrong place for doing what you're trying to acheive.

    Personally I'd set this up as a Windows Service and have the service check the database, compile the email as required, and add the email to a queueing service. The email service would then be seperate from this and would dispatch the emails at some interval.

    What's stopping you at present from using another method than embedding this in your MVC site?

提交回复
热议问题