Executes workflow steps at specific times or recurring intervals for time-based automation, monitoring tasks, and background processes.
The scheduleFlow function enables Vibes to execute workflow steps at specific times or recurring intervals. This powerful function allows you to create time-based automation, set up monitoring tasks, and schedule background processes that run independently of user interactions.
Schedule a set of workflow steps to execute at a specified date/time, with optional recurring intervals for ongoing automation and monitoring.
Time-Based Automation: This function extends Vibes beyond real-time interactions, enabling sophisticated time-based workflows and monitoring systems that operate independently while maintaining access to your workflow context and global variables.
| Parameter | Type | Required | Description |
|---|---|---|---|
| steps | array | Array of workflow steps to execute on schedule | |
| start_date_time | string | Date/time when execution should begin | |
| start_date_time_format | string | Format string for parsing the start_date_time | |
| time_zone | string | Timezone for schedule execution (e.g., "America/Chicago") | |
| is_recurring | boolean | Optional | Whether the schedule should repeat (default: false) |
| recurring_interval | string | Optional | Time unit for recurrence (required if is_recurring is true) |
| recurring_increment | number | Optional | Number of intervals between executions (required if is_recurring is true) |
The cancelScheduledFlow function returns a simple completion confirmation:
| Interval | Description | Example Usage |
|---|---|---|
| second | Every N seconds | High-frequency monitoring |
| minute | Every N minutes | Status checks, brief polls |
| hour | Every N hours | Regular data collection |
| day | Every N days | Daily reports, maintenance |
| week | Every N weeks | Weekly summaries |
| month | Every N months | Monthly processing |
| year | Every N years | Annual tasks |
Scheduled flows operate in an isolated context environment with specific restrictions that are important to understand:
How to properly set up global variables for scheduled access:
Important Context Note: Scheduled flows cannot access step outputs from the original workflow. Store all necessary data in global variables before scheduling.
Set up continuous monitoring with conditional alerting:
Automated weekly performance reports with HTML formatting:
Schedule monthly maintenance tasks during off-hours:
Setting up configuration that scheduled flows can access:
Plan schedules carefully considering timezones, precision, and testing requirements.
Optimize scheduled flows for efficient resource usage and system performance.
Implement robust error handling for reliable scheduled operations.
Properly manage workflow context and data access for scheduled execution.
These functions work together with scheduleFlow for comprehensive time-based automation and monitoring: