scheduled task on web server

I have an ASP.NET web application on a virtual server. I've moved some background tasks (sending emails, data cleanups etc.) out of the web app and into a separate console app which is scheduled to run every 5 minutes.

When the console app runs it still slows the website down. I want website responsiveness to be at it's maximum, and it doesn't matter if the console app runs slower behind the background.

Should I decrease the scheduled tasks priority to 9? Or will this have some negative consequences. Both the console app and website rely on an SQL Server express database, which seems to have high CPU when the console app runs.

Thanks in advance for your advice/feedback


Based on the commentary that you have provided it would seem that the reasoning for the impact is in the impact to the shared database. Regardless of the priority of the process if it is bottle-necking the database it is going to slow the web application.

You might look to see WHY the operation is causing undue stress to the database. Look for missing indexes, the queryplan will be helpful here. Additionally look at your application and ensure that it is using the data in the most effective manner.

Additionally, remember that SQL Server Express has a number of limitations if you are using it for production!.

链接地址: http://www.djcxy.com/p/38896.html

上一篇: 将Windows计划任务或Windows服务迁移到Azure Web作业

下一篇: Web服务器上的计划任务