How to start batch processes on SQL Server 2008

I created a very simple chat application, similar to ASP.NET, which displays current Online / Offline users:

I have a table with a DateTime column used as a TimeStamp. Each time a user raises a Postback event or similar Get event, I update TimeStamp. I want the server to create a batch process that I can use to check how long the user has been inactive, given that I know that the last time they were active. As soon as they are considered inactive (I’ll say in a few minutes), I want to set the value of another column to mark them as “Offline”.

Any suggestions would be appreciated.

+3
source share
3 answers

Although the answer given above for using SQL Server Agent is a very good solution, do you think that there is a component on the server (possibly a WCF component) that performs all state management, instead of directly managing state in the database?

+1
source

- , - Asp.Net Windows, -. -, - -.

+1

Source: https://habr.com/ru/post/1702955/


All Articles