Schedule trigger

The Schedule trigger lets you run your integration periodically at specific time intervals. This trigger is useful when you want to run your integration automatically without any manual intervention. For example, you can consider using the Schedule trigger for the following type of tasks:

  • Uploading files from one system to another system at regular intervals
  • Sending periodic email reminders
  • Syncing database at regular intervals

Before you begin

Ensure that you assign the Apigee Integration Invoker IAM role to the Apigee Service Agent ( service-PROJECT_ID @gcp-sa-apigee.iam.gserviceaccount.com ) in your Google Cloud project.

For more information about assigning IAM roles, see Managing access in Google Cloud.

Add a Schedule trigger

To add a Schedule trigger to a new or existing integration, perform the following steps:
  1. In the Apigee UI, select your Apigee Organization.
  2. Click Develop > Integrations.
  3. Select an existing integration or create a new integration by clicking Create Integration.

    If you are creating a new integration:

    1. Enter a name and description in the Create Integration dialog.
    2. Select a Region for the integration from the list of supported regions.
    3. Click Create.

    This opens the integration in the integration designer.

  4. In the integration designer navigation bar, click +Add a task/trigger > Triggers to view the list of available triggers.
  5. Click and place the Schedule trigger element to the designer.

Configure a Schedule trigger

Click the Schedule trigger element in the integration editor to view the trigger configuration pane.

You can configure the Schedule trigger using either of the following modes:

  • Basic: Provides a user interface to configure the frequency of the run.
  • Advanced: Uses a cron expression to configure the frequency of the run.

In Basic mode, you can choose to run the integration at a specific time or at hourly intervals. If you want to run the integration at a specific time, select the Run at a specific time from the Times drop-down and set the following properties:

  • Time: The time (in 24-hour format) at which the integration must run.
  • Days: The days on which the integration must run. You can select to run the integration every day, on specific days of the week, on a specific day of the month, etc.
  • Months: The month(s) in which the integration must run. You can run the integration every month or choose specific months.

In Advanced mode, you can specify the frequency of the run using a cron expression. The cron expression has five values that must be specified in the following order:

  • Minute (0-59)
  • Hour (0-23)
  • Day of the month (1-31)
  • Month, either of the following values:
    • A number 1-12
    • A three-letter month abbreviation (e.g. Jan, Feb, Mar, etc.)
  • Day of week, either of the following values:
    • A number from 0 - 6 starting with Sunday as 0
    • A three-letter day abbreviation (e.g. Mon, Tue, Wed, etc.)

For example, to run the integration on the first day of every month, use the * * 1 * * cron expression.

Best practices

As a best practice, deactivate Schedule triggers when they are no longer needed. If you leave a redundant Schedule trigger active, it will continue to trigger the integration automatically.

To deactivate a Schedule trigger, you can do one of the following:

  • Unpublish the integration containing the Schedule trigger. Your integration will no longer be active and the trigger will not run.
  • Replace the Schedule trigger with a different trigger and re-publish the integration. The re-published, active version of the integration will not use the Schedule trigger.
  • Delete the current version of the integration. You can find the Delete option under the version list next to the integration name.