You can create an event in Power Manager to automatically log out users after a set period of time. The user will be warned before the log out occurs and see a count down timer in the menu bar.
We have helped numerous organisations create schedules to implement a robust automatic log out. The schedule was typically run on computers in shared, kiosk, or public settings that the customer wanted to offer to their users. An automatic log out ensures users are limited in their session times and the computer reverts to a known safe state regularly.
We created the new user session time trigger with these situations in mind. The new trigger reduces the once multi-event schedule to single simple event. We added a dedicated Schedule Assistant task to make the set up even easier.
Notifications and Warning the User
To ensure the user is never surprised by the automatic log out, Power Manager presents the following notifications:
- a notification dialog that provides administrators the option to adjust or cancel the log out;
- a notification via the macOS's Notification Centre;
- a count down timer in the menu bar during the notification period;
- a large warning moments before log out begins.
By default, notifications appear 15 minutes before the log out. The notification time can be altered with the menu item Scheduler > Notification Options…. Additional warnings, customised dialogs, and more are all possible.
And, if the computer is asleep when the log out is due, Power Manager will wake the computer before performing the log out.
Why not AppleScript?
We have previously discussed the benefits of Power Manager's log out approach compared to an AppleScript
log out request and, while macOS has changed in the past nine years, those benefits remain largely the same.
Creating an Automatic Log Out Event
Let's walk through creating an automatic log out event with the Schedule Assistant.
- Launch Power Manager.app
- Add a new event; select the menu item: File > New > New Event…
- Select Log out during a user session in the Schedule Assistant, then Continue.
- Within the Session Time step, we want to customise the time before automatically logging the user out. Type
10 0into the Time after log in? field and press the tab key to validate the time. Once validated, the displayed time will appear as
- Continue to the Time Constraints step; there is nothing to change in this step.
- Continue to the Interactive Constraints step; there is nothing to change in this step.
- Continue to the Why step. Name your event and add any notes you desire. The name will be seen by the user of the computer.
- Continue to the Confirm step.
- Add to confirm the creation of the new event.
The automatic log out event has been created and is active. You should now test the event works as desired. Do this by logging out and then logging back in.
As an administrator, you can adjust and cancel pending automatic log outs but standard and guest users can not.