Jump to content

Recommended Posts

Posted

Hi there,

 

I am just wanting clarification on two points i have noticed:-

 

1) We noticed that when the HAP web app was stopped and people logged in or logged off then the HAP logon tracker used for log on and log off would just hang. My guess is that it is because it cannot contact the site as we stopped this for maintenance. Is there anyway a timeout can be built in so it gives up after a few seconds?

 

2) With logon tracker is there anyway to configure it to clear logons that are so many days old. As i have noticed that laptops especially that have not been shutdown correctly say students are still logged on. I know you can manually set all as logged off. It would be nice to have this process automated.

 

Thanks

David

Posted

Here's the code to clear logons, you can schedule it with Windows Task Scheduler

 

1. Save this as clearlogons.sql (c:\)

USE [hap]
GO

UPDATE [dbo].[TrackerEvents]
  SET [LogoffDateTime] = GETDATE()
WHERE [dbo].TrackerEvents.LogoffDateTime is null
GO

2. Add a scheduled task to run as a user with rights to the database (or use a logon id)

3. This is the command to run: (use osql -? to find out what you can change)

osql -E -i c:\clearlogons.sql

Posted
Ive gone to download off codeplex and when i click 9.7 download i get the following file "HAP+ Web v9.6.0929.1500 Upgrade.zip" Is that correct?
  • 2 weeks later...
Posted
I have downloaded and installed the msi but it hasn't created the folder or the .exe file?

Anyone else had this issue for the logon tracker .exe?

Posted
Yes, it's a 60 seconds timeout, or shoudl be

 

Is there anyway you could build in a switch for the program so the timeout can be customized to lower than 60 seconds

Posted
Is there anyway you could build in a switch for the program so the timeout can be customized to lower than 60 seconds

I have just tested the new HAP logon with the HAP website stopped and it logged straight on and off with no problem but it didn't have a 60 second wait it just went straight through with no problems. Is this what you were expecting it to do Nick?

  • 2 weeks later...
Posted
Here's the code to clear logons, you can schedule it with Windows Task Scheduler

 

1. Save this as clearlogons.sql (c:\)

USE [hap]
GO

UPDATE [dbo].[TrackerEvents]
  SET [LogoffDateTime] = GETDATE()
WHERE [dbo].TrackerEvents.LogoffDateTime is null
GO

2. Add a scheduled task to run as a user with rights to the database (or use a logon id)

3. This is the command to run: (use osql -? to find out what you can change)

osql -E -i c:\clearlogons.sql

 

This was a great help Nick thanks.

 

I have slightly adjusted this and think this may be useful for others as well. It basically pulls out records with a logon date less than current date - 2 days and where the logoff date is null.

 

USE [hap]

GO

 

UPDATE [dbo].[TrackerEvents]

SET [LogoffDateTime] = GETDATE()

WHERE [dbo].[TrackerEvents].[LogonDateTime] < DATEADD(dd,-2,GETDATE()) and [dbo].[TrackerEvents].[LogoffDateTime] is null

GO

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...