开发者

Creating a Task scheduler for Database status change

开发者 https://www.devze.com 2023-04-10 05:13 出处:网络
In my application a registered user\'s profile should expire after 3 mont开发者_C百科hs from the registration date. I need to check and set the status of users to expired in DB every day atmidnight. H

In my application a registered user's profile should expire after 3 mont开发者_C百科hs from the registration date. I need to check and set the status of users to expired in DB every day at midnight. How can I achieve this. I think this may be done by creating a windows service and a scheduler and timer.


You don't need windows service for this. A scheduled task would do this nicely. Just launch taskschd.msc and create new task.
Depending on what you are using for DB, another option for you might be a DB mainenance task. This is easy to do in SQL Server, many other enterprise level databases can do that too.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号