7.3 Schedule trigger

Lesson

7.3 Schedule trigger

Schedule triggers enable time-based pipeline execution using familiar cron expressions or simplified scheduling options. This trigger type is ideal for batch processing workflows, daily ETL operations, and recurring analytical tasks that need to run at predictable intervals.

Create a scheduled trigger

To create a schedule trigger in Mage, navigate to your pipeline and follow these steps:

Configure basic settings:

  • Click the "Triggers" tab in your pipeline interface

  • Select "Add trigger" and choose "Schedule" from the trigger types

  • Provide a descriptive name for your trigger (e.g., "daily_sales_etl")

  • Add an optional description explaining the trigger's purpose

Set schedule parameters:

Mage offers multiple frequencies to define your schedule:

  • Custom cron expression: Use standard cron syntax for precise timing control

    0 2 * * *    # Daily at 2:00 AM
    0 */6 * * *  # Every 6 hours
    0 9 * * 1-5  # Weekdays at 9:00 AM
  • Interval-based: Set simple intervals using minutes, hours, or days

    • Once - will run only one time

    • Hourly - will run at the top of every hour

    • Daily - will run at 00:00 GMT daily

    • Weekly - will run on Monday at 00:00 GMT

    • Monthly - will run the first day of each month at 00:00 GMT

    • Always on - will run continuously


Advanced schedule configuration

Schedule triggers support additional configuration options for production environments:

  • Timezone settings: Specify execution timezone to ensure consistent timing across regions

  • Start dates: Define trigger lifecycle with start dates. If you set the start date in the past, the trigger will begin running once it is saved.

Enable landing time for triggers

Mage Pro triggers support custom configuration to deliver predictable completion times through intelligent scheduling optimization. Landing time ensures your pipelines complete by a specific deadline rather than just starting at a scheduled time.

To enable landing time functionality:

  • Toggle on "Enable landing time" in your schedule trigger settings

  • The trigger frequency must be @hourly, @daily, @weekly, or @monthly

  • Set "Pipeline complete by" time using Hour, Minute, and Second dropdowns

Mage Pro automatically calculates "Average runtime" based on previous pipeline executions, or begins calculating this metric from new runs if no historical data exists. For example, if you want your daily pipeline to complete by 6:00 AM and it typically runs for 30 minutes, Mage will automatically start execution at 5:30 AM.

This feature is particularly valuable for:

  • SLA compliance where data must be available by specific times

  • Downstream system dependencies that require data by certain deadlines

  • Business reporting requirements with strict delivery schedules

  • Coordinating multiple pipeline executions with time-sensitive dependencies


Best Practices for Schedule Triggers:

  • Use descriptive names that indicate frequency and purpose

  • Set appropriate timeouts based on expected pipeline duration

  • Consider data source availability when scheduling (avoid maintenance windows)

  • Monitor execution patterns and adjust schedules based on performance metrics

Schedule triggers form the foundation of reliable batch processing workflows, ensuring your data pipelines execute consistently without manual intervention.