7

What would be the best way of running scheduled tasks in asp.net 5, mvc 6 app. It will be ideal if I could use the built-in dependency injection in scheduled tasks. I will be running this application under dnx.

I know this question have been ask for earlier versions of asp.net but those solutions might not be the best way in asp.net 5. As it has a different runtime.

eadam
  • 23,151
  • 18
  • 48
  • 71
  • First of all, maybe you could disclose why you need httpcontext in scheduled task? – VidasV Jun 20 '15 at 07:53
  • Sometimes i need Url or hostName to run conditions in a multi tenant environment. – eadam Jun 20 '15 at 08:07
  • 1
    [How to run Background Tasks in ASP.NET](http://www.hanselman.com/blog/HowToRunBackgroundTasksInASPNET.aspx), [The Dangers of Implementing Recurring Background Tasks In ASP.NET](http://haacked.com/archive/2011/10/16/the-dangers-of-implementing-recurring-background-tasks-in-asp-net.aspx/). – CodeCaster Jun 20 '15 at 12:17

0 Answers0