How to Log Out Users After Ten Minutes

Learn how to automatically log out users after a period of use.

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; Screenshot showing the Power Manager notification
  • a notification via the macOS’s Notification Centre; Screenshot showing the Notification Center notification
  • 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.

Screenshot showing the Power Manager notification options

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.

  1. Launch Power Manager.app Launch Power Manager on macOS
  2. Add a new event; select the menu item: File > New > New Event…
  3. Select Log out during a user session in the Schedule Assistant, then Continue. Schedule Assistant: Log out during a user session
  4. Within the Session Time step, we want to customise the time before automatically logging the user out. Type 10 0 into the Time after log in? field and press the tab key to validate the time. Session Time: Entering a duration Once validated, the displayed time will appear as 10 minutes. Session Time: Validated duration
  5. Continue to the Time Constraints step; there is nothing to change in this step. Time Constraints in the Schedule Assistant
  6. Continue to the Interactive Constraints step; there is nothing to change in this step. Interactive Constraints in the Schedule Assistant
  7. 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. Name and document your event in the Why step
  8. Continue to the Confirm step. Check event in the Confirm step
  9. Add to confirm the creation of the new event. The newly created automatic log out event in Power Manager

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.