【发布时间】:2012-06-15 18:32:05
【问题描述】:
我正在使用 Visual Studio 2010 和 Database Sql Server 2010。
我创建了一个窗口服务,它必须在时间间隔发生时发送电子邮件 (EMAIL_SENT_TIME)
我的数据库包含这些列
Tracker_Id bigint
,EMAIL_SENT_TIME bigint --this contains interval in which the email must be fired 1800,3600,7200 etc,
Last_check datetime --the previous check datetime,
next_check datetime --the next check datetime
假设表包含此日期
tracker_Id | EMAIL_SENT_TIME |最后检查 |下一个检查
100097 1800 日期时间 nextdatetime
100098 3600 日期时间 nextdatetime
100099 7200 日期时间 nextdatetime
100100 1800 日期时间 nextdatetime
1800 表示 30 分钟, 3600 表示 1 小时等。
我想在 30 分钟后发送电子邮件,那些 EMAIL_SENT_TIME 是 1800 等等。
如何解决这个问题....
【问题讨论】:
-
为什么投反对票告诉我,这样我就不会再犯错了
-
你看过Quartz.NET?
标签: c# visual-studio-2010 windows-services window