0

I have a web page that loads a URL and does the processing using

... Server.createobject("Microsoft.XMLDOM")

every 5 minutes. It processes the data and stores it in a database.

Basically, it needs to be in a loop and run every 5 minutes and PARSE the xml.

Is there a better way to do this?

I'm open to suggestions.

TIA Steve42

4

1 に答える 1

0

これには 2 つの方法があります。1 つは、JavaScript コードを使用してクライアントからサーバーへの呼び出しを行い、もう 1 つは、その呼び出しを Web サービスに分離して、Windows サービスなどに配置することです。

最初のオプションは次のようになります。

$(document).ready(function() {
    setTimeout(functionToCall, (1000 * 60 * 5)); // Make a call every five minutes
});

function functionToCall() {
    $.ajax({
        url: 'call to your page',
        type: 'GET
    }).done(function() {
        alert("Things processed");
    }).fail(function() {
        alert("Error occurred");
    });
}

これは、あなたにアイデアを与えるために私の頭から何かです。これは最も理想的なソリューションではないかもしれませんが、ガイドラインを提供する必要があります。

于 2013-03-08T19:27:26.917 に答える