This recipe shows how to get an Automator workflow to run after a period of user inactivity. If the Mac is left idle, you can use Power Manager to automatically run a Automator workflow. A workflow can be used to present warnings, clean up files, or run complex sequences of tasks.
Create an Automator After Inactivity Event
Let's create an event that runs an Automator workflow after 15 minutes of user inactivity.
- Launch Power Manager.app
- Click Add… to create a new event
- Select the Run an Automator workflow after inactivity task in the Schedule Assistant
- Choose or drag and drop your workflow onto Drop an Automator workflow here
- Continue to the After Inactivity step
- Adjust the period of inactivity to wait.
- Continue through the Time Constraints and Interactive Constraints steps; we will skip constraints for this recipe
- Continue to the Why step
- Name your new event and provide any notes
- Add to create your new idle Automator workflow event
Your event is created and immediately scheduled. If you leave your Mac alone for 15 minutes, the Automator workflow will automatically run for the active user.
If you need to perform tasks when no-one is logged in, consider scheduling a shell script.