简体   繁体   中英

How to schedule a long running process/report in asp.net MVC

I am working on a requirement to create a report that uses a large data with lots of rows and time consuming. The idea is to kick off the report and come back later to view the report.

How can I handle this using MVC?

so far I visited links,

ASP.Net MVC Long Running Process

http://blog.robseder.com/2013/10/18/executing-a-long-running-process-from-a-web-page/#comment-1524804

SignalR requires other frame works. at my work we only have .net 4.0

Any one can shed light on this?

For requirements like this I usually create a console app that does the processing. Then setup a job with no schedule on SQL Server. Create an MVC action that connects to the database to start the job when the user clicks a button that should start creating the report. Then have another MVC action that connects to the database to check the status of the job. Sometimes I'll have my console app write a progress message to the database and have my MVC action display that instead of the database job status.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM