How to run a web page(aspx) doing a functionality, triggered by windows task scheduler in a new thread?
I have a situation in which i am fetching top row from a temporary table and doing a functionality using that details. The temporary table will be updated with the new uploaded file details. I do have an aspx page which does this functionality. The web page is triggered using a task scheduler at some interval of开发者_如何转开发 time. My problem is that when the page is triggered during a schedule if the functionality is not finished before the next trigger the task scheduler gets stuck and won't work unless a new schedule is created.
I have heard that executing the functionality using asp.net threading can solve my problem. Is that possible for my situation? If so any one please help me with code how i can proceed..
Now i just fetch only one top row to do the process. If i can implement this for top few rows (say top 5 rows) then i can increase the speed of my application. Please suggest a solution to implement this as well..
- increase the time scheduler time a little bit to it can get completed before another starts.
- Improve the update query, so it can save time.
- Threading is good idea. But...
- Each scheduler should check if the previous one is already running or not, you can put a status of (running/ completed) somewhere in table.
- Log scheduler activity (start, end, elapsed time etc), it will help a lot.
精彩评论