How to Auto Call My Method In Time Period Without Running any WebPage in my application in ASP.net C#?

1.2k views Asked by At

I Want to Automatically Run my Method in evry for example 10 minute. But i Do not want to Run Any Page to Do it. I Want to Click on a button and then EVEN IF I CLOSE MY PAGE the application Do the method evry 10 minute. For Example :

 protected void AutoButton_Click(object sender, EventArgs e)
    {//I want to application run above methods evry 10 minute EVEN IF I CLOSE THE PAGE
        GetGoldPrices();
        SaveGoldPrices();
        GetCoinPrices();
        SaveCoinPrices();
        GetExchangePrices();
        SaveExchangePrices();
    }

I Found This Article which was useful but i get my host from a company and can not set any thing out of my WEB SITE PANEL... Any suggest to how can i do this please?

1

There are 1 answers

1
Paperwaste On

Take a look at http://www.codeproject.com/Articles/6507/NET-Scheduled-Timer

Its a nice package for scheduling repeating functions.

You would have to set up a timer at the top level of your program if you want it to run even when the pages are closed.