如何在asp.net中的特定时间运行任务? [英] How to run a task in specific time in asp.net?

查看:96
本文介绍了如何在asp.net中的特定时间运行任务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好.
我在每个站点中搜索了此问题,但也找不到任何东西.

考虑一下:我想在特定时间发布邮件,例如2012年9月21日在asp.net.

一些用户帮助我使用Windows服务,但这需要一台专用主机.其他一些用户让我使用Web服务并为此设置了计时器,但是当Windows关闭时,每个触发器都会重置.我该怎么办?

感谢您的回答,请原谅我的英语不好.

Hi there.
I searched in every site for this issue, but i could not find any thing as well.

Think about this: I want to post a mail at specific time, like 21 Sep 2012 in asp.net.

Some user helped me to use windows service, but this one need a dedicated host. Some of the other user took me use web service and set timer for that, but when windows shutdown, every trigger is reset. What can i do for this issue?

Thanks for your answers, and excuse me for my bad English language.

推荐答案

在asp.net中,您插入了global.asax文件和
Application_Start事件,您可以检查日期并编写用于发送邮件的代码.
in asp.net you insert the global.asax file and
Application_Start event you check date and write code for send mail.


这篇关于如何在asp.net中的特定时间运行任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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