What is the best practice for running additional continuous tasks(eg a timer) in .net core mvc application (since there is no Application_start
event). Should i place it in the Main
method or somewhere else?
It's a self-hosted app.
I would create it a separate Console App and schedule a window task using Task Scheduler to execute this app as needed, this is the case if you are deploying in a VM, if you are deploying to Azure, then it will be a Web Job.
I will do my best to keep away any long running processes from MVC
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.