如何自动调用我的方法在时间间隔不运行在我的ASP.net C#应用程序的网页? [英] How to Auto Call My Method In Time Period Without Running any WebPage in my application in ASP.net C#?

查看:148
本文介绍了如何自动调用我的方法在时间间隔不运行在我的ASP.net C#应用程序的网页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要自动运行我的方法艾薇如10分。
但我不希望运行任何页面来完成它。
我想点击一个按钮,那么即使我闭上我的页面应用程序执行方法埃夫里10分钟即可到达
例如:

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();
    }

我发现这个<一个href=\"http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx\"相对=nofollow>文章这是有用的,但我从一个公司,我的主机和不能设置任何东西了我的网站面板...
任何建议我如何能做到这一点吗?

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?

推荐答案

看看的 HTTP://www.$c$cproject.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.

这篇关于如何自动调用我的方法在时间间隔不运行在我的ASP.net C#应用程序的网页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆