## Part 1
NOTE: Please repeat below steps for each of "Keep "Session Log" for" values, excepting "Forever". That is - for 1 day, 1 week, 2 weeks, 1 month, 3 months, 1 year, 2 years, 3 years, 5 years values of "Keep "Session Log" setting.
# go to {nav Configuration > Website > Advanced} section# go to {nav Configuration > Website > Advanced} section
# ensure that "Keep "Session Log" for" is set to "Forever"
# ensure that "Track database changes to change log" is checked, save
# ensure that "Keep "Session Log" for" is set to "1 week"# log out
# change "Enable SEO-friendly URLs mode (MOD-REWRITE)" setting, save# log in
# log out# go to {nav Tools > Query Database} section
# launch some SQL to offset all non-null SQL like "UPDATE inp_UserSessionLogs. SET SessionEnd values more than "1 week" to the past= -5 WHERE NOT ISNULL(SessionEnd)"
# log in# go to {nav Logs & Reports > Session Log} section
# go to {nav Configuration > Website > Scheduled Tasks} section# confirm, that Session end date for all ended sessions is about 01/01/1970
# edit "# run `in-portal scheduled-task:run rotate_session_logs" record, change "Next Run On" to some date in the past` command from shell while in the project directory
# wait until "rotate_session_logs" scheduled task performs it's job# go to {nav Logs & Reports > Session Log} section
# go to {nav Logs & Reports > Session Logconfirm, that oldest sessions remains in the list
## Part 2
NOTE: Please repeat below steps for each of "Keep "Session Log" for" values, excepting "Forever". That is - for 1 day (86400 seconds), 1 week (604800 seconds), 2 weeks (1209600 seconds), 1 month (2629800 seconds as average), 3 months (7889400 seconds as average), 1 year (31557600 seconds as average), 2 years (63115200 seconds as average), 3 years (94672800 seconds as average), 5 years (157788000 seconds as average) values of "Keep "Session Log" setting.
# go to {nav Configuration > Website > Advanced} section
# confirm,# ensure that only current session"Keep "Session Log" for" is in the listset to "1 week"
# go to {nav Logs & Reports > Changes Log} section# change "Enable SEO-friendly URLs mode (MOD-REWRITE)" setting, save
# confirm, that only# go to {nav Logs & Reports > Changes Log} section
# confirm, that last change of Scheduled taskConfiguration is in the list
## Part 2
t
# log out
# log in
# go to {nav Tools > Query Database} section
# launch SQL like "UPDATE inp_UserSessionLogs SET SessionEnd = UNIX_TIMESTAMP() - #seconds# WHERE NOT ISNULL(SessionEnd)", where #seconds# must be replaced with corresponding integer value from note above
# go to {nav Logs & Reports > Session Log} section
# go to {nav Configuration > Website > Advanced} section# confirm, that Session end date for all ended sessions is about ("Current Date" - "period, selected from note above for test")
# ensure that "Keep "S# run `in-portal scheduled-task:run rotate_session Log" for" is set to "Forever"_logs` command from shell while in the project directory
# launch some SQL to offset all non-null UserSession# go to {nav Logs.SessionEnd values to the very past value like -5 & Reports > Changes Log} section
# wait until "rotate_session_logs" scheduled task performs it's job# confirm, that list is empty
# go to {nav Logs & Reports > Session Log} section
# confirm, that oldesnly current sessions remain is in the list
## Part 3
# make 2 or more outdated sessions with change log records (login and logout several times, make some changes and save)
# launch SQL like "UPDATE inp_UserSessionLogs SET SessionEnd = -5 WHERE NOT ISNULL(SessionEnd)"
# go to {nav Logs & Reports > Session Log} section
# launch some SQL to offset all non-null UserSessionLogs.S# confirm, that Session end date for all ended sessionEnd values to the very past value like -5ns is about 01/01/1970
# go to {nav Configuration > Website > Advanced} section
# ensure that "Keep "Session Log" for" is set to "1 week"
# change system code temporarily - set $limit = 1 in place of $limit = 100 in SessionLogEventHandler::OnRotate event
# wait until "# run `in-portal scheduled-task:run rotate_session_logs" scheduled task performs it's job` command from shell while in the project directory
# go to {nav Logs & Reports > Session Log} section
# confirm, that only current session is in the list
# go to {nav Logs & Reports > Changes Log} section
# confirm, that only last change of Scheduled task issession changes are in the list
# restore system code - set $limit = 100 in SessionLogEventHandler::OnRotate event