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.
    Click Add… to create a new Power Manager event

    Click Add… to create a new Power Manager event

  3. Select the Launch an application daily task.
    Select the task Launch an application daily

    Select the task Launch an application daily

  4. 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

  5. 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

  6. Continue to the When step.
  7. 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

  8. Continue to the Constraints step.
    Continued passed the Constraints step

    Continued passed the Constraints step

  9. Continue to the Why step.
  10. Name and describe your new event.
    Name and describe the event in the Why step

    Name and describe the event in the Why step

  11. 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.

This article was posted in , , and and tagged , and .

Published by Graham Miln on