Running a Workflow

There are multiple ways to run workflows. You can initiate a workflow manually from the Administration application or the Anzo Admin CLI. You can also automate workflows by using the Linux Cron utility or a similar application to schedule them. This topic provides instructions for running a workflow manually and gives an example of a cron job that runs a workflow on a schedule.

Running a Workflow Manually

There are two ways to run a workflow manually:

  1. You can click the run icon () for the workflow in the Administration application.

  2. You can click the copy icon () to copy the anzo call statement for the workflow and run it with the Admin CLI.

Scheduling a Workflow to Run Automatically

To automate the running of a workflow, you can set up a cron job that runs the anzo call statement on a schedule. This section gives example steps to follow to set up a cron job that schedules a single workflow.

  1. First, find the anzo call statement for the workflow that you want to schedule. As shown in the image below, you can click the copy icon () for the workflow to copy the statement.

  2. On the Anzo server, run the following command to open a crontab:
    sudo crontab -e -u <user_name>

    For example, the following command opens a crontab as the Anzo service user:

    sudo crontab -e -u anzo
  3. Add contents to the file using the following syntax. Use an asterisk in place of options that you do not want to set:
    <minute> <hour> <day_of_month> <month> <day_of_week> <absolute_path_to_client/anzo_call_statement>

    For example, the following contents run the Workflow every day at 8:00 AM:

    0 8 * * * /opt/Anzo/Client/anzo call -n http://cambridgesemantics.com/IngestManagerConfiguration/ff3b3e313f634535b49e71167ca56096#runWithDefaultOrchestration
  4. Save and close the crontab.