ASP Classic Fire and Forget

非 Y 不嫁゛ 提交于 2019-12-24 13:33:13

问题


I have a "Remote Control" webpage that lets me "manage" key stats for a website e.g there is a page that shows the stats, no of records, dates, times things happened, whether they have happened or not and so on.

Then I have "a remote control" page which lets me fire off certain tasks such as "run job A" "set value of X to C" "delete records in table B"

and so on.

This is just a list of links that then runs an SQL ADO Command with an ADO Connection string.

At the moment the page waits for the response of the stored procedure so it can show any error messages etc on the page.

However I want to add some jobs to the stored proc that could consume quite a while e.g 30-90 minutes long (jobs that should have run in the middle of the night etc) so if I am out and can see these jobs haven't tun I can fire a process to start them.

However I obviously don't want to lock my webpage up by waiting for the return code of the stored proc.

Ideally I would like to do something like fire an HTTP Non Blocking Get Request or in .NET an Aysnc Begin NonQuery like action. So I could fire the command on the DB and then return from that straight away.

However I don't know how I can do that in ASP Classic. Fire n Forget.

Maybe I have my Sunday head on or just need to think a bit more out the box e.g use jQyuery and AJAX to do a non blocking HTTP Request to another page THAT then fires the SQL query waits for it (Server.ScriptTimeout=0, CommandTimeout = 0) and then when it comes back with the response just do nothing with it.

Any ideas?

Thanks

来源:https://stackoverflow.com/questions/25105340/asp-classic-fire-and-forget

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!