How to Open a Link or URL

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

You can create an event in Power Manager that automatically opens a link or URL.

The URL will open in the user’s default browser. This behaviour can be customised by passing additional arguments to the open command.

Creating a URL Opening Event

Let’s create an event that opens this web site in the active user’s web browser.

  1. Launch Power Manager.app Launch Power Manager on macOS
  2. Add a new event; select the menu item: File > New > New Event…
  3. Select the Schedule Assistant task Execute a command line tool on-demand. Schedule Assistant: Execute a command line tool on-demand
  4. Within the Executable step, use the executable open to open your desired URL:
    • Set Executable to /usr/bin/open
    • Add a blank argument and edit the blank argument to be the URL to open. For this recipe, the URL is https://www.dssw.co.uk Select the open tool and URL
    • To open multiple URLs, append additional arguments for each URL. Modern browsers will open a new tab for each URL. Select the open tool and multiple URLs
  5. Continue to the Environment step; there is nothing to change in this step. It is important the command is executed as the Active User. Run the command as the active user
  6. Continue to the Constraints step; there is nothing to change in this step. Continue passed the constraints
  7. Continue to the Why step. Name your event and add any notes you desire. The name will be seen by the user of the computer. Name and describe your event
  8. Continue to the Confirm step. Confirm the event’s creation
  9. Add to confirm the creation of the new event. The event is created and ready to use

The automatic link opening event has been created and is active. You should now test the event works as desired. Do this by triggering the event from the Power Manager status-menu bar:

The on-demand event appears in the status menu

Alternatively, the new event can be triggered from the Scheduler view:

  • Power Manager.app > Scheduler (menu) > Show Scheduler

Specific Browser

To open the link is a specific browser, pass the browser’s bundle identifier with the -b flag. To open a URL using Mozilla’s FireFox browser, the full open command becomes:

/usr/bin/open -b org.mozilla.firefox https://www.dssw.co.uk

For the event, pass the following three arguments:

  1. -b
  2. org.mozilla.firefox
  3. https://www.dssw.co.uk