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.

We recommend embedding your scripts with Power Manager events. Embedded scripts can not be accidentally moved or changed without realising they are part of a greater workflow. Events with embedded scripts can also be shared easily; the schedule file contains everything needed. See our recipe about creating an event with an embedded script.

Sometimes an external script is the only available option. Let’s walk through how to create a Power Manager event that executes an existing shell script on your Mac.

Creating a Shell Script Event

  1. Launch Power Manager.app.
  2. Click Add… to create a new event.

TODO

Click Add… to create a new Power Manager event

  1. Select the Launch an application daily task.

Select the task Launch an application daily

Select the task Launch an application daily

  1. Choose your external shell script for Launch which application?.

Choose the external script for Power Manager to execute

Choose the external script for Power Manager to execute

  1. After choosing your script, an Environment popup menu appears. This indicates Power Manager recognises the chosen file is a script and can be executed.

After choosing a script an environment option appears

After choosing a script an environment option appears

  1. Continue to the When step.
  2. Adjust the time and date to perform your script.

Adjust the time and days to perform the external script

Adjust the time and days to perform the external script

  1. Continue to the Constraints step.

Continued passed the Constraints step

Continued passed the Constraints step

  1. Continue to the Why step.
  2. Name and describe your new event.

Name and describe the event in the Why step

Name and describe the event in the Why step

  1. Continue and then Add your Power Manager script event.

Add the event in the Confirm step

Add the event in the Confirm step

The external shell script event is created and available immediately

The external shell script event is created and available immediately

Your event is scheduled immediately and will perform at the time you selected in the When step.

Your event is also available on-demand, through the Power Manager status menu and via Power Manager Remote on your iOS device.