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.
Automator workflows offer a powerful and visual way to escape the burden of repetitive tasks on the Mac. Automator is included with Mac OS X and the files it creates are called workflows.
Workflows can be used to interact with and automate a wide range of built-in and third party software on Mac OS X. Many modern applications include Automator actions. These actions can be combined into sequences, and it is these sequences that are called workflows.
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. You might expect we would create an event to launch or open our workflow file. You can do this but the result is probably not what you want. A launch or open event will cause Automator to launch and display your workflow, but the workflow will not be performed.
Instead, we need to create a script based event. Our event will use the command line tool automator
to perform the workflow, rather that to open it.
Create a Scheduled Automator Workflow Event
Launch System Preferences and select Power Manager.
Click Add… to create a new event.
Choose the template Run a script daily.
Click Continue to the Script step.
Enter the following script into Script to run:
#!/bin/sh automator /Users/dssw/Documents/MyGreatWorkflow.workflow exit 0
You will need to change the workflow path, on the second line after
automator
, to refer to your workflow file’s location.Click Continue to the When step.
Adjust the time and days to read 9:00, with only Monday through Friday selected.
Continue through the remaining steps until your event is created.
Having followed the steps above, Power Manager will have created a single event. The event is immediately scheduled and your Mac will now run the Automator workflow at 09:00 on Monday to Friday each week.
You can see your new event in the Power Manager status menu bar. You can even perform the Automator workflow immediately through the menu bar, or via Power Manager Remote on your iOS device.
Not only can Power Manager run Automator workflows, but Power Manager can also be controlled by Automator. Look for Power Manager’s actions within the Utilities folder of the Automator application.