ScheduleTriggerNodeEditor Documentation
Purpose
The ScheduleTriggerNodeEditor is a component used within the Vantage platform to configure scheduling parameters for data workflows. It allows users to define when specific tasks should run, adjusting properties such as type, frequency, and timings. This aids in automating data processing and execution of analytics tasks based on predefined schedules.
Settings
The ScheduleTriggerNodeEditor includes several settings that affect its configuration and functionality. Each setting is explained in detail below:
1. Schedule Type
- Name:
scheduleType - Input Type: Dropdown
- Description: This setting allows users to select the type of schedule for task execution. Available options include "Interval", "Daily", "Weekly", "Monthly", and "Custom Cron". Changing this affects other settings displayed based on the type selected.
- Default Value:
interval
2. Interval Minutes
- Name:
intervalMinutes - Input Type: Numeric
- Description: Specifies how often (in minutes) the task should run when the schedule type is set to
interval. Users can choose from preset intervals or input a custom value. Adjusting this value directly impacts the frequency of task execution. - Default Value:
60(minutes)
3. Time of Day
- Name:
timeOfDay - Input Type: Time
- Description: For scheduling types that require a specific time (Daily, Weekly, Monthly), this setting allows users to specify the exact time of day when the task should run. Changing the time impacts the execution schedule accordingly.
- Default Value:
09:00(9 AM)
4. Day of Week
- Name:
dayOfWeek - Input Type: Multi-select (buttons for days)
- Description: Applicable for the
weeklyschedule type, this setting allows users to select one or more days of the week for task execution. Changing the selected days directly influences which days the tasks will run. - Default Value:
""(no days selected)
5. Day of Month
- Name:
dayOfMonth - Input Type: Numeric
- Description: This setting is used in the
monthlyschedule type to specify the day of the month when the task should run. This value is crucial for monthly scheduling and will influence task execution if it is changed. - Default Value:
1
6. Cron Expression
- Name:
cronExpression - Input Type: String
- Description: For
custom cronschedule types, this setting allows advanced users to define a cron expression that specifies exact times for execution. Altering this expression allows for highly customized and flexible scheduling beyond standard presets. - Default Value:
""(empty)
How It Works
The ScheduleTriggerNodeEditor component leverages state management to update scheduling configurations dynamically. The primary functionalities include:
- Dynamic Scheduling: Users can choose their scheduling type, after which corresponding settings are displayed, such as intervals or specific days.
- Computing Next Runs: The
computeNextRunsfunction calculates the timestamps of the next N executions based on the currently set configuration, providing immediate feedback on what the schedule looks like. - Quick Presets: The interface offers quick setup options that allow users to select commonly used schedules quickly, which automatically populates the necessary fields.
Expected Data
The ScheduleTriggerNodeEditor expects data in the form of a configuration object that may include:
{
scheduleType: String, // Type of schedule (interval, daily, etc.)
intervalMinutes: Number, // Interval in minutes if applicable
timeOfDay: String, // Time of day in HH:MM format
dayOfWeek: String, // Comma-separated string of days for weekly scheduling
dayOfMonth: String, // Day of the month for monthly scheduling
cronExpression: String // Cron expression for custom schedules
}Use Cases & Examples
Use Case 1: Regular Data Refresh
A company wants to refresh its sales data visualization every hour to ensure users always have access to the most current data analysis.
- Configuration Example:
- Schedule Type:
interval - Interval Minutes:
60(every 1 hour) - Time of Day: Not applicable
- Schedule Type:
Use Case 2: Weekly Reporting
A team needs to send out a weekly report every Monday at 9 AM to stakeholders.
- Configuration Example:
- Schedule Type:
weekly - Day of Week:
1(for Monday) - Time of Day:
09:00(9 AM)
- Schedule Type:
{
scheduleType: "weekly",
dayOfWeek: "1",
timeOfDay: "09:00"
}Use Case 3: Monthly Data Backup
An organization schedules a monthly backup of its data on the last day of every month at midnight.
- Configuration Example:
- Schedule Type:
monthly - Day of Month:
0(indicating the last day) - Time of Day:
00:00(midnight)
- Schedule Type:
{
scheduleType: "monthly",
dayOfMonth: "0", // should be adjusted in logic
timeOfDay: "00:00"
}This component simplifies the process of scheduling tasks effectively, keeping in mind user needs for automation and data handling within the Vantage environment.