Cookbook

On this page we have brought together recipes for creating energy and time saving events.

Step-by-step recipes for doing more with Power Manager on macOS. Each recipe includes screenshots and detailed instructions for creating automation tasks with Power Manager.

Below are 105 step-by-step recipes.

  • Scheduling a Shut Down on macOS

    It is possible to schedule a Mac to shut down at a particular time or after a specific event. There are different approaches available depending on the situation.

  • How to Script Power Manager Licensing

    A recipe showing how to apply a licence to Power Manager using a script.

  • How to Open a Link or URL

    Learn how to open a link or URL from a scheduled event.

  • How to Prepare a Schedule for File Configuration

    Learn how to export and prepare a schedule for distribution using Power Manager's file configuration capability.

  • How to Run a Script When the Battery is Charged

    Learn how to automatically run a script when the computer battery is charged.

  • How to Distribute Power Manager Settings

    A guide showing how to create an installer package containing Power Manager settings.

  • How to Log Out Users After Ten Minutes

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

  • How to Stop Your Mac Sleeping While Time Machine is Running

    Learn how to keep your Mac awake while Time Machine is running.

  • Cloning and Deploying a Power Manager Schedule

    Learn how to clone a Power Manager schedule using the command line tool pmctl.

  • How to Mount a Mac Drive to a Schedule

    Learn how to automatically mount a drive or volume on macOS to a schedule.

  • How to View Power Manager's Unified Log Entries

    Learn how to view Power Manager's log entries in macOS's Unified Logging system.

  • How to Automatically and Quietly Shut Down a Mac

    Learn how to automatically shut down a Mac quietly without notifications.

  • How to Run a Script Before an Inactivity Triggered Log Out

    Learn how to run a script just before automatically logging out an inactive Mac.

  • How to Show an Inactivity Warning

    Learn how to show a warning before an inactivity triggered event occurs.

  • How to Trigger an Event with the Power Manager Application

    Learn how to trigger an on-demand event from the macOS Power Manager application.

  • How to Add On-Demand Behaviour to an Event

    Learn how to add on-demand behaviour to your Power Manager events. On-demand allows you to perform events manually, at any time.

  • How to Launch an Application Shortly After Log In

    Learn how to launch an application after a delay on OS X after logging in.

  • Better Sleep for Your Mac Media Server

    How to improve when your Mac media server goes to sleep after periods of inactivity. In this recipe we combine Power Manager's inactivity trigger with a custom condition to ensure no media is playing.

  • Triggering On-Demand Events for Non-Administrators

    On-demand events are Power Manager events that can be manually triggered at any time. In this recipe we open on-demand events up to non-administrators.

  • How to Adjust Power Manager's Notification Center Alerts

    Power Manager uses OS X's Notification Center. In this recipe we walk through how to customise the alert's behaviour.

  • How to Wait for Log Out

    How to make your scripts wait for the user to log out before continuing. In this recipe we use Power Manager's await log out action.

  • How to Update Power Manager

    We recommend updating to the latest Power Manager. In this article we show you how to update with the built-in updater and avoid running an old scheduler.

  • How to Backup Power Manager

    When disaster strikes, having a backup of your work is critical. Here is how to backup your Power Manager schedule.

  • Calculating Sunrise and Sunset

    You can use Power Manager to calculate sun observation times with AppleScript or JavaScript. We walk through how to calculate sunset times in London and Australia, now and in the future.

  • How to Power On Your Mac at Sunrise

    Power Manager includes sun observation triggers that let you schedule events at sunrise and sunset anywhere in the world. In this recipe we will walk through how to set this up.

  • How to Change Your Wireless MAC Address

    Learn how to change or spoof your MacBook's wireless MAC address. This recipe make use of on-demand event with Power Manager.

  • How to Run a Script When Your Mac Powers On

    Learn how run a script when your Mac powers on or wakes up with Power Manager. This recipe can be expanded to schedule AppleScripts and Automator workflows.

  • Creating a Foundation for Your Events

    Power Manager lets you create your own events. To get started, first create an empty event; this recipe shows you how.

  • How to Automate Disk Permission Repairs

    Automate away the time consuming task of repairing disk permissions on Mac OS X. We create a Power Manager event to call the diskutil repair command once a week to avoid permission problems building up.

  • How to Install Power Manager Over the Network

    We step through installing Power Manager on a remote Mac over the network.

  • How to Run a Shell Script After Inactivity

    Learn how to run a shell script when your computer has been left inactive.

  • How to Shut Down Before the Battery Fails

    Power Manager is able to safely shut down your Mac before the built-in battery runs out of power. Power Manager can also do the same for Uninterruptible Power Supply connected Macs.

  • How to Run an Automator Workflow After Inactivity

    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.

  • How to Schedule a PowerPoint Presentation to Automatically Start

    This recipe walks through scheduling a PowerPoint presentation to begin playing without needing human interaction. The presentation will automatically launch and begin when you need it to.

  • How to Schedule an Automator Workflow

    This recipe shows how to run an Automator workflow automatically and to a schedule. A fun, if opaque, sub-title might be "How to Automate Automator". This recipe makes use of a new Schedule Assistant task recently added to Power Manager.

  • How to Automate the Playing of a Movie

    This recipe walks through scheduling a movie to starting playing on loop. Power Manager includes a task that deals with launching your movie in QuickTime Player and starting playback automatically. Through the task, you can play the movie back in full screen mode and ask the movie to loop forever. Both these features are optional but for most situations they will be ideal.

  • How to Run a Script from a Menu Item

    Running a script from a menu bar item in Mac OS X is a great time saver. The menu bar is always available and easy to access. In this recipe we will create a menu item that triggers a shell script, all using Power Manager.

  • How to Shut Down When UPS Power Drops

    Power Manager can shut down your Mac when the remaining power of an Uninterruptible Power Supply (UPS) drops to a critical level. This recipe walks through how to set this up.

  • How to Schedule an External Shell Script

    Power Manager can schedule an external shell script to run at specific times or on-demand. An external shell script is separate from your Power Manager event and is often an executable file containing a bash, perl, python or ruby script.

  • How to Schedule a Hard Drive to Unmount or Eject

    By limiting when your back up drive can be accessed, you minimise the chances of accidental deletion and mistakes that risk the contents of the drive.

  • How to Make Events Conditional on Running Applications

    Power Manager events can perform a wide range of actions to a schedule. Eventually you will want to create an event that only performs if a specific application is or is not running. For many, this is the first step from creating simple events to creating more sophisticated schedules.

  • How to Schedule a launchd Job

    launchd manages Mac OS X services. These services include a mix of critical processes, such as the WindowServer, and optional services like screen sharing. We are going to use Power Manager to turn on and off services according to a schedule.

  • How to Start Up Your Mac Using AppleScript

    You can schedule your Mac to automatically start up using Power Manager and AppleScript. Using AppleScript to create start up events opens up new possibilities for crafting complex and dynamic power management schedules.

  • Triggering an Event from the Command Line

    Power Manager events can be be triggered from the command line - often referred to as from the shell. This ability allows you to incorporate your events into other scripts and to trigger events through a remote secure shell connection (ssh).

  • How to Set Up Power Manager with a Web Server

    Power Manager's energy saving schedules can be deployed through a web server. This technique can be used to deploy schedules to a few Macs or many thousands of Macs.

  • How to Schedule an Application to Quit

    Applications can be scheduled to launch using Power Manager's built-in Schedule Assistant, but what if you need to schedule an application to quit? In this recipe we will walk through how to ask an application to quit.

  • How to Schedule an AppleScript Minutes After Login

    Power Manager can schedule actions relative to a trigger. In this article we will walk through scheduling an AppleScript to run 10 minutes after logging in.

  • How to Schedule Your Mac to Log Out

    In this recipe we will walk through how to schedule your Mac to automatically log out. It is good practice to log out when leaving a Mac unattended.

  • How to Schedule Time Machine

    You can control when Time Machine starts backing up. We are going to create an event in Power Manager that starts a Time Machine back up each day at a specific time.

  • How to Trigger Events When Your Mac is Asleep or Powered Off

    Power Manager can power on your Mac to perform scheduled events. Your Mac can be asleep and Power Manager will do its best to power on your Mac to perform your schedule.

  • Sending Requests with the Power Manager SDK

    You can create tools and utilities that interact with Power Manager. Your software can send Power Manager requests asking for events to be performed, variables to be set, and schedules to be changed.

  • Binding with the Power Manager SDK

    Binding makes it easy to track changes in the Power Manager engine. Binding is part of Objective-C/Cocoa's Key Value Observation (KVO) methodology, and Power Manager SDK provides full support for this sophisticated ability.

  • Observing with the Power Manager SDK

    How can you create an interface that always shows the latest information, but does not require a refresh button? For Objective-C developers the answer is to set up code to observe changes.

  • Connecting with the Power Manager SDK

    You can create tools and utilities that talk directly to Power Manager using the Software Development Kit (SDK). Connecting to Power Manager from your software is easy and requires only a few lines of code.

  • How to Set the Volume When Logging In

    Chances are, at one time or another, you have raised the volume on your Mac and forgotten to quieten it afterwards. That next alert, bleep, or song played at full volume was unwelcome at best.

  • How to Shut Down Your Mac After Inactivity

    You can make your Mac automatically shut down after a period of inactivity. This ability is not included as standard in Mac OS X; to do this you will need to use Power Manager.

  • How to Run a Shell Script When Logging Out

    Let's walk through how to schedule a shell script to run after a user logs out of Mac OS X. Our shell script is going to be very simple but you can make yours as complex as needs be.

  • Connecting to Power Manager via the Internet

    Power Manager on your Mac can be safely managed via the Internet. Using Power Manager Remote, you can also connect via a mobile/cellular network. Getting the connection up and running requires following a few steps, and this is what we will walk through today.

  • How to Perform an Event with AppleScript

    Power Manager lets you build events capable of performing complex sequences of actions. Power Manager also lets you schedule these events to occur on specific triggers, such as the time of day or after user inactivity. What if no trigger suits your needs? In this situation, you will want to perform the event yourself.

  • How to Turn Off All Event Notifications

    Power Manager works hard to ensure users are notified of pending events. These notifications take the form of warning notifications, a count down timer in the menu bar, and full screen alerts as significant events perform. A few are required but most are optional. However, sometimes people want to turn off the optional built-in notifications.

  • How to Turn Off an Event's Notifications

    Power Manager automatically notifies the user of pending triggers. These notifications provide an opportunity for users to respond to an event. However, there are situations where notifications are not required, or where notifications get in the way. This recipe shows how to turn off notifications for a single event.

  • How to Extend Power Manager with Growl

    Power Manager supports the open source notification utility, Growl. Growl lets you customise how and when you see notifications from your favourite applications.

  • How to Display a Message After a Long Task

    Power Manager is frequently used to start long running tasks. While any event is running, Power Manager's menu bar changes to show a small cog. Sometimes this small indicator is not enough.

  • How to Enforce a Maximum Use Time on Mac OS X

    Use time restrictions are often essential for Mac computers in shared environments such as schools, labs, and public buildings. A computer's use time is the maximum amount of time a user can use the computer. After that period has elapsed, the user should log out to allow others an opportunity to use the computer.

  • How to Trigger a Warning When Your UPS Switches to Battery

    You can script your Mac to perform actions, such as running a command or launching an application, when your uninterruptible power supply (UPS) switches over to the emergency battery.

  • How to Launch an Application When Switching to Mains Power

    You can use Power Manager to automatically launch an application when switching from battery to mains power.

  • How to Schedule Your Mac to Shut Down

    Using Power Manager you can schedule your Mac to shut down itself at night, or whenever you want. You can schedule your Mac to shut down at different times on different days, or even multiple times a day.

  • How to Run a Command When Switching to Battery Power

    You can have your Mac automatically run a command line tool when switching to and from battery power. Let's make your Mac provide an audible warning when you disconnect the mains power supply from your laptop. To do this we are going to use Power Manager and the command line tool say.

  • How to Run a Shell Script Every Day on a Mac

    Power Manager can be used to automatically run a shell script each day. Shell scripts can be used to perform tasks that are difficult, or impossible, to achieve using the graphical Mac OS X interface.

  • How to Run an AppleScript After Inactivity

    Power Manager can run an AppleScript after a period of inactivity on Mac OS X. Unlike most other scheduling tools, Power Manager can run your AppleScript as the front most user. This means your AppleScript can interact with applications and the user; with Power Manager your AppleScript is not restricted as it is with other tools.

  • How to Make Your Mac Idle Sleep After Different Times on Different Days

    Your Mac can automatically enter a special low power mode called sleep. While your Mac is asleep it uses far less energy than when it is awake. Having your Mac sleep when not in use is much better than leaving it powered on constantly; you use less energy and that saves money on your electricity bill.

  • How to Make Your Mac Sleep After Inactivity

    Your Mac can automatically go into a low power mode called "sleep" after a period of idle time. This significantly reduces the running cost of your Mac. But for many, automatic sleep does not work correctly or as assertively as they want.

  • How to Play a Song in iTunes at a Specific Time Every Day

    You can use Power Manager to automatically play a song at a specific time each day. You can also create multiple events to play different songs at different times or on different days.

  • How to Schedule an iPhoto Slideshow to Play Automatically

    Power Manager can be used to start an iPhoto slideshow playing automatically. You can create an event that will wake up your Mac, launch iPhoto, and start your slideshow at a specific time or on certain days of the week. Let's walk through how to create an event to launch iPhoto and to start playing a slideshow.

  • How to Run an Automator Workflow to a Schedule

    Automator does not include a means of running workflows to a schedule. You must manually open and run the workflow, or use other tools to arrange for the workflow to be run. In this recipe we will look at how to use Power Manager to automatically run an Automator workflow.

  • Fast User Switch to the Login Window After Inactivity

    After a period of user inactivity, Power Manager can Fast User Switch your Mac back to the Login Window. This is a great feature for getting the most out of shared Macs in labs. In an ideal world, you and I would always remember to log out when we have finished using our computer. This frees up the Mac for others to log in and get on with their tasks.

  • How to Energy Schedule Your Museum Macs

    Power Manager is ideal for use in museums, installations, and exhibits. Power Manager can fully automate and energy manage Mac computers dispersed around your exhibits and, once set up, no further interaction with the Mac is required from staff. For curators and exhibitors looking to reduce your running costs, Power Manager includes a Schedule Assistant built for you.

  • Make Your Mac Sleep For an Hour

    Your Mac can be scheduled to put itself to sleep and to wake up. Traditionally these related tasks are considered and scheduled separately. Power Manager does away with this distinction and lets you schedule your Mac to sleep for specific durations, such as over your lunch break.

  • How to Schedule Your Mac to Sleep

    Using Power Manager you can schedule your Mac to go sleep at a specific time each day.

  • How to Run an AppleScript When Switching to Mains Power

    You can use Power Manager to trigger an event whenever your Mac laptop is connected to mains power.

  • How to Run an AppleScript On Wake Up

    You can use Power Manager to run an AppleScript when you wake up your Mac. Running an AppleScript when your Mac wakes up can be used to automate repetitive configuration tasks, such as mounting disks, or establishing a connection to a particular wireless network.

  • How to Run an AppleScript When Switching to Battery Power

    You can use Power Manager to run an AppleScript when you disconnect your Mac from mains power and start using battery power. Running an AppleScript when your Mac laptop's power source changes is surprisingly useful. With this ability, you can turn on and off power hungry services and settings, launch applications, or just warn the user that the power cord has come out.

  • How to Schedule Your Mac to Wake Up with AppleScript

    Modern Macs are able to wake up from sleep, and start up from a powered off state. One quick and easy use for this ability is to avoid waiting for your Mac to start up in the morning. We are going to create an event using Power Manager and AppleScript.

  • Using the Notification Trigger in Power Manager

    Power Manager has the ability to trigger events on receiving a system wide notification, and to post system wide notifications as part of an event's actions. For developers, and for those integrating Power Manager into their workflow, these two abilities are a great way of loosely chaining tools together.

  • Using an External Script as an Event Condition

    You can augment Power Manager's built-in energy saving functionality with shell scripts and other external tools. This article shows you how to create an event that uses an external script as a condition.

  • How to Power On Your Mac at a Specific Date and Time

    Mac computers have the ability to power themselves on. This ability is available on all Macs running Mac OS X. You can schedule your Mac to power itself on in the morning No more waiting for your Mac to start up. One less reason to leave your Mac on over night; remember, a powered off Mac uses less energy than a sleeping Mac.

  • How to Log Out Users With AppleScript

    Being able to log out a user on Mac OS X with AppleScript is useful. A common reason for needing to log out a user is to ensure a shared Mac is freed up for other users. The simplest way of logging out an active user is shown in the AppleScript snippet below. The script asks the System Events process to begin the log out process.

  • How to Automatically Log Out Your Mac After Inactivity

    When a Mac is available publicly, or in a shared environment like a classroom, it can be useful to automatically log out after a period of inactivity. An automatic log out helps ensure the Mac is returned to a good state after a user has left, and helps avoid a Mac being left logged in unnecessarily.

  • How to Avoid Passwords in Power Manager Scripts

    Last time we talked about managing Macs with Power Manager's pmctl command line tool. I am going to explain how pmctl supports Mac OS X's Keychain and how you can avoid needing to enter your name and password each time you connect to a remote Mac.

  • How to Connect To Power Manager Over the Network

    Power Manager can be connected to and managed remotely over a network. The simplest way to manage deployments of Power Manager is with Power Manager Professional. But this is not the only way. Let's walk through how to use the standard command line tools to remotely connect to a Mac running Power Manager.

  • How to Run a Script Within Every User Session

    Ever wanted to run a script within every user session on Mac OS X? The chances are you have not. The need tends to be rare, but when needed it is essential. Until Power Manager Professional 4, being able to run a script within every user session was beyond the reach of most administrators.

  • How to Allow Non-Administrators to Run On-Demand Events

    You may want to provide non-administrator colleagues with the ability to trigger on-demand events. This can be particularly useful where an event is used to perform back ups or run a script requiring elevated privileges. Let's look at how to ease this security requirement.

  • How to Automatically Stop a PowerPoint Presentation

    Today, we will walk through how to stop a PowerPoint presentation. As with starting a presentation, stopping the presentation will require a little AppleScript.

  • How to Automatically Start a PowerPoint Presentation

    I would like to cover how to automatically start a PowerPoint presentation on Mac OS X. Unlike Keynote, starting a PowerPoint presentation requires a little bit of AppleScript. If you are not familiar with AppleScript, do not worry. We will walk through each step needed.

  • How to Change On-Demand Behaviour With AppleScript

    On-demand events are useful. On-demand events appear in Power Manager's status menu bar and can be triggered with a single mouse click from within any application.

  • How to Schedule Your Mac to Restart Once a Week

    It can be useful to ensure your Mac is restarted at least once a week. In managed environments, such as classrooms and labs, Macs can go many weeks without being shut down or restarted. Being able to automate a restart once a week is possible with Power Manager.

  • How to Improve Your Back Ups on Mac OS X

    Backing up your personal files is an essential, if mundane, task. One day you will experience problems with your Mac that risks loosing important files, documents, or photos. There are three steps you should take to secure your irreplaceable information:

  • How to Automatically Stop a Keynote Presentation

    Yesterday, we looked at how Power Manager can be used to automatically open and start a Keynote presentation. Today, we will create an event to stop the presentation at a specific time each day.

  • How to Automatically Start a Keynote Presentation

    Ever wondered how conference venues, theatres, and businesses control there large screen televisions and projectors? Most organisations use a surprisingly simple combination of a Mac and some presentation software.

  • How to Automatically Log Out After Inactivity on Mac OS X

    Power Manager can automatically log out inactive users. Being able to log out inactive users is designed for use in school computer labs and in situations where computers are shared. By automatically logging out an inactive user, the Mac becomes available for the next person to use.

  • How to Launch a Program After Inactivity on Mac OS X

    Power Manager can launch applications, documents, and scripts after inactivity. The Schedule Assistant includes a task to help create events that will launch an application after inactivity.

  • How to Schedule Your Mac to Power On

    Mac computers have the ability to automatically power themselves on. A switched off, shut down, Mac can be scheduled to start up at a specific date and time. This ability is present in all modern Mac computers.

  • How to Schedule an Application to Launch on Mac OS X

    Power Manager can schedule applications to launch regularly. The Schedule Assistant includes tasks to help create events that will launch an application daily, on specific dates, or after a period of inactivity.

  • How to Schedule an AppleScript on Mac OS X

    Power Manager can schedule AppleScripts to run regularly, as part of a schedule. The Schedule Assistant includes tasks to help create events that will run your AppleScript daily, on specific dates, or after a period of inactivity.

  • How to Shut Down Your Mac Using AppleScript

    To be nice to anyone using our Mac, we want to provide a little notification before shutting down. Let's create an event that will shut down your Mac in ten minutes time. To do this, we can use AppleScript to create a scheduled shut down event.

More Recipes

The latest recipes and insights for getting the most from Power Manager are published first on Energy Aware.