Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/272.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 服务器上的计划事件_C#_Asp.net_Events_Notifications_Scheduling - Fatal编程技术网

C# 服务器上的计划事件

C# 服务器上的计划事件,c#,asp.net,events,notifications,scheduling,C#,Asp.net,Events,Notifications,Scheduling,我目前正在使用ASP.net创建一个web应用程序,它跟踪许多任务,这些任务都有一个截止日期存储在SQL数据库中 我的目标是让服务器在到期日过后通知用户,无论是通过电子邮件、浏览器界面还是通过其他通信方式 任何时候都可能有数千个任务到期,因此我认为轮询效率低下 使用C实现这一点的正确或最佳方法是什么?对这个过程的一般性解释会很好。我对这项技术不太了解,但我认为Signalr可能就是您想要的 请参见我认为最好的方法之一是将异步编程与async结合使用,并等待中的解释 一种方法是运行一个调度程序,从

我目前正在使用ASP.net创建一个web应用程序,它跟踪许多任务,这些任务都有一个截止日期存储在SQL数据库中

我的目标是让服务器在到期日过后通知用户,无论是通过电子邮件、浏览器界面还是通过其他通信方式

任何时候都可能有数千个任务到期,因此我认为轮询效率低下


使用C实现这一点的正确或最佳方法是什么?对这个过程的一般性解释会很好。

我对这项技术不太了解,但我认为Signalr可能就是您想要的


请参见

我认为最好的方法之一是将异步编程与async结合使用,并等待中的解释

一种方法是运行一个调度程序,从数据库中检索数据并在一段时间内处理它们

例如,每小时检索到期日已过的用户,并向这些用户发送通知

调度任务有多种方法。这里有一个简单的方法-