Creating a Task scheduler for Database status change
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.
精彩评论