Lesson
5.6 Practice exercise
Scenario
You work for NYC's Performance Analytics team. City managers need a daily summary of 311 service requests by 8:00 AM to plan daily operations and resource allocation. Your pipeline processes the latest 311 data to track response times by department, identify emerging neighborhood issues, monitor seasonal trends, and support resource planning for city services.
Exercise Requirements
Create a schedule trigger with the following specifications:
Pipeline Name: "mage_academy_nyc_311"
Business Requirement: 311 analytics dashboard must be updated by 8:00 AM EST daily
Data Source: NYC Open Data 311 Service Requests (updates continuously)
Audience: City managers who review metrics during 8:30 AM operational meetings
Step-by-step trigger implementation
Step 1: Navigate to Trigger Configuration
Open your "mage_academy_nyc_311" pipeline in Mage
Click the "Triggers" tab
Select "Add trigger" → "Schedule"
Step 2: Basic Trigger Setup
Name:
daily_311_triggerDescription:
Fetch NYC 311 service requests for city manager dashboard - must complete by 8:00 AM EST for operational planning
Step 3: Configure Schedule Settings
Frequency: Select "Custom"
Cron expression: Add a cron expression that will run at 0700 hours Eastern time (GMT -4)
Start Date: Set to yesterday’s date to begin the schedule and get data for today.
Step 4: Configure Run Settings
Timeout: 2400 seconds (40 minutes) - provides buffer for data volume spikes
Status for timed out runs: Failed (default) - ensures immediate alerts for missed deadlines
Skip run if previous run still in progress: Enable - prevents overlapping executions during heavy processing days
Expected Trigger Behavior
Initial runs: Pipeline starts at 0700 AM EST
Weekend processing: Continues daily schedule to capture weekend service requests
Holiday handling: Automatic execution ensures no gaps in operational data
Validation Checklist
[ ] Trigger successfully created with daily frequency
[ ] Landing time configured for 8:00 AM EST completion
[ ] Timeout settings provide adequate processing buffer
[ ] Manual test run completes within expected timeframe
This trigger configuration ensures NYC city managers have reliable, timely access to 311 analytics data for daily operational decision-making.
