Schedule
Automatically start workflows on a schedule
Node Type
Trigger
Category
Workflow Control
Icon
Clock
Overview
The Schedule node is a trigger node that automatically initiates workflow execution at specified intervals or times. This powerful automation tool enables recurring tasks, periodic reminders, and scheduled data processing without manual intervention. Perfect for maintenance tasks, regular reports, and time-based business processes.
Key Features
- • Flexible Scheduling: Support for minute, hour, day, week, and month intervals
- • Frequency Control: Customizable execution frequency for each timeframe
- • Automatic Execution: Workflows start automatically without manual triggers
- • Time Tracking: Provides execution timestamps for monitoring and logging
- • Precise Timing: Uses millisecond precision for accurate scheduling
- • Recurring Automation: Enables continuous, hands-off workflow execution
Prerequisites
Scheduling Requirements
Understanding of time-based workflow execution needs
Automation Planning
Technical Requirements
Node Configuration
Required Fields
Timeframe
The time unit for the schedule. Choose from minute, hour, day, week, or month intervals. This determines the base unit of time for your scheduling frequency.
Frequency
How often to run the workflow. For example, with timeframe "day" and frequency "2", the workflow runs every 2 days. With timeframe "hour" and frequency "1", it runs every hour.
Optional Fields
The Schedule node has no optional fields. All configuration is handled through the two required inputs: timeframe and frequency.
Technical Details
Schedule Calculation Process
How the node calculates execution intervals and timing
Timeframe Resolution
The getTimeframeMs()
method converts human-readable timeframes to millisecond constants: MS_IN_MINUTE
, MS_IN_HOUR
,MS_IN_DAY
, MS_IN_WEEK
, and MS_IN_MONTH
.
Interval Calculation
The getTimeBetweenExecutionsMs()
method calculates the total milliseconds between executions by multiplying the timeframe milliseconds by the frequency value. This provides precise timing for the scheduler system.
Template Resolution
Both input fields use parseValueTemplate()
to resolve any template variables or dynamic values, allowing for flexible scheduling configurations that can change based on context or external data.
Trigger Execution
How the scheduled trigger node handles time-based activation
Execution Prevention
Like all trigger nodes, the Schedule node cannot be executed as part of a workflow graph. When _execute()
is called, it throws an error indicating it's a trigger node.
Scheduled Triggering
The _trigger()
method is called by the scheduler system at the calculated intervals. It returns the current execution timestamp, providing a record of when the scheduled execution occurred.
Timestamp Generation
Each trigger execution generates a new ISO 8601 timestamp using new Date().toISOString()
. This ensures accurate tracking of when each scheduled workflow execution began.
Examples & Use Cases
Daily Data Processing
Process data and generate reports on a daily schedule
Use Case
Automatically process daily data, generate reports, and send them to stakeholders every morning without manual intervention.
Configuration
{
"timeframe": "day",
"frequency": 1
}
This runs the workflow every 1 day (daily) at the scheduled time.
Workflow Structure
Weekly Maintenance Tasks
Run system maintenance and cleanup tasks weekly
Use Case
Automatically perform system maintenance, database cleanup, log rotation, and performance monitoring on a weekly basis.
Configuration
{
"timeframe": "week",
"frequency": 1
}
This runs the workflow every 1 week (weekly) at the scheduled time.
Processing Steps
- Schedule triggers weekly maintenance workflow
- System cleanup and optimization tasks execute
- Performance metrics are collected and analyzed
- Maintenance report is generated and stored
- Team is notified of completion status
Hourly Monitoring
Monitor systems and services every hour
Use Case
Continuously monitor system health, service availability, and performance metrics every hour to ensure optimal operation and quick issue detection.
Configuration
{
"timeframe": "hour",
"frequency": 1
}
This runs the workflow every 1 hour (hourly) at the scheduled time.
Monitoring Workflow
Benefits
- • Proactive Monitoring: Issues detected before they become critical
- • Performance Tracking: Continuous monitoring of system metrics
- • Automated Response: Immediate alerts for system issues
- • Historical Data: Build comprehensive performance baselines
Best Practices
Do's
- • Choose appropriate timeframes for your use case
- • Use frequency values that make sense for your business needs
- • Test scheduling logic with longer intervals first
- • Monitor execution times and adjust schedules as needed
- • Implement proper error handling in scheduled workflows
- • Consider timezone implications for global operations
- • Use execution timestamps for logging and debugging
Don's
- • Don't set extremely frequent schedules without considering resource usage
- • Avoid scheduling workflows that might conflict with each other
- • Don't forget to handle timezone differences
- • Avoid scheduling during peak business hours for non-critical tasks
- • Don't assume all timeframes are equally suitable for your use case
- • Avoid scheduling workflows that depend on external services without fallbacks
- • Don't ignore the impact of daylight saving time changes
Troubleshooting
Common Issues
Workflow Not Running on Schedule
Symptoms: Scheduled workflows don't execute at expected times
Solution: Verify that the scheduler system is running and properly configured. Check that the timeframe and frequency values are correct, and ensure the workflow trigger system is connected to the scheduler.
Incorrect Execution Intervals
Symptoms: Workflows run at unexpected intervals or frequencies
Solution: Double-check your timeframe and frequency configuration. Remember that frequency multiplies the timeframe, so frequency 2 with timeframe "day" means every 2 days, not twice per day.
Resource Exhaustion
Symptoms: System becomes overwhelmed with too many scheduled executions
Solution: Review your scheduling frequency and consider using longer timeframes or lower frequencies. Implement proper resource management and consider staggering multiple scheduled workflows to avoid concurrent execution peaks.
Timezone Confusion
Symptoms: Workflows execute at unexpected times due to timezone differences
Solution: Ensure your scheduler system is configured with the correct timezone. Consider using UTC for global operations and be aware of daylight saving time changes that might affect your schedules.