且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在asp.net中实现后台进程

更新时间:2023-02-16 12:30:42

您也可以使用SQL Server Job实现此行为。





1.用户购买产品时,您将在表格中输入订单详情。





OrderId,PurchaseDate,Email ,UserId,IsMailSent等





2.安排每天运行一次并检查PurchaseDate的SQL作业。如果purchaseDate大于或等于一年,则向该用户发送电子邮件,并在数据库中将IsMailSent设置为True。
You can achieve this behavior using SQL Server Job also.


1. When ever the user purchase a product you will enter his order details in a table.


OrderId, PurchaseDate, Email, UserId ,IsMailSent etc


2. Schedule a SQL Job which runs daily once and checks PurchaseDate. If the purchaseDate more than or equal to One year then shoot email to that user and set the IsMailSent to True in the database.