Can KBM be programmed to automatically login a user to OSX?


I have a routine that needs to run every Sunday morning, however, it's on a Mac that either has its screen locked, or has been restarted and has not yet logged in.

How can I unlock the computer or login to a user account automatically to ensure that the routine will actually run when I've scheduled it?


As far as I can see, you have two potential options, although neither of them (necessarily) involves Keyboard Maestro.

First is that you can set your Mac will automatically log in your user. You can set it up so that as soon as it is logged in it will go back to the "login window" screen (the one that you would see via Fast User Switching). If your Mac is not holding government secrets and is in a relatively secure location, this is probably a feasible option.

The second is that you can use launchd to run some kinds of commands, even when there is not a logged in user. However, these are mostly limited to shell script commands, not app commands. (I'm 99% sure this is possible, although I have not done it myself for awhile so I might be mis-remembering.)

I wrote about the first option here including all of the necessary steps to make it work. I do this with my Mac mini, which lives in my garage and needs to always be logged in. You could use Keyboard Maestro with this setup.

If you want to try the second option, I'd need to know some more specifics about what your "routine" entails before I could comment about if it is possible or not. You would not be able to use Keyboard Maestro in that scenario, however.