I am currently using a SQL database to write to a table. Data is written to the SQL whenever a user with a specific role is logged in and navigates to a page using an onStartup script. The data is then added to the table. When the user logs out, an onShutdown script runs and removes them from the SQL database and table. If the browser is abruptly closed, once the session timeout is reached (currently 60 seconds for testing) they will be removed from the table.
However, when Ignition's built in inactivity timer logs them out, they are never removed from the database/table until they log back in. To my understanding this is because neither the onStartup or onShutdown script runs since the page does not refresh, change, or close.
The reason for all of this is to show where a user is currently at and (eventually) compare the data from one column (Page name, custom property) to warn a user if multiple people are currently accessing/modifying the same page.
I'm still fairly new to scripting, SQL, and Ignition in general, so I was pretty happy to even get the table part working.
Do you guys have any suggestions on how I should go about removing the user when Ignition's built in inactivity timer logs a user out? If I could set the inactive timer to log them out AND refresh the page or navigate to the "overview" screen, theoretically that would work. (Given that clicking logout refreshes the page and DOES remove them from the list)
Thanks in advance!