Schedule Management
Softyflow's schedule management system allows you to automate the execution of processes and tasks at specific times or intervals. The system supports multiple scheduling patterns, environment modes, and provides comprehensive monitoring and error handling capabilities.
Overview
The schedule management system consists of:
- Frontend Interface: Vue.js component for creating and managing scheduled tasks
- Backend Job Processor: Agenda.js-based system for executing scheduled jobs
- Multiple Environment Support: Test, UAT, and Production modes
- Flexible Timing Options: DateTime, intervals, and Cron expressions
- Error Notifications: Automated email alerts for failed processes
- Log Management: Automated cleanup and monitoring
Creating Scheduled Tasks
Accessing the Scheduling Interface
Navigate to Manage → Scheduling Tasks in the Softyflow IDE to access the scheduling interface.
Basic Scheduling Setup
Click "Create Scheduling Tasks" to open the creation dialog
Select Environment Mode:
- TEST: For development and testing
- UAT: For user acceptance testing
- PROD: For production environments
Choose Project and Process:
- Select the target project from the dropdown
- Choose the specific process to schedule (filtered by selected project)
Set Start Date and Time:
- Use the date picker to select when the schedule should begin
- Time is specified down to the minute
Scheduling Options
Interval-Based Scheduling
For regular repetitions, choose from:
- Days: Execute every X days
- Hours: Execute every X hours
- Minutes: Execute every X minutes
Example: To run a process every 2 hours, select "Hours" and enter "2" in the delay value.
Cron Expression Scheduling
For complex scheduling patterns, use Cron expressions:
Cron Syntax Format:
Seconds (0-59) Minutes (0-59) Hours (0-23) Day_of_Month (1-31) Months (1-12) Day_of_Week (0-7) Year (1970-2099)
Common Cron Examples:
0 0 9 * * MON-FRI *
- Every weekday at 9:00 AM0 30 14 * * * *
- Every day at 2:30 PM0 0 0 1 * * *
- First day of every month at midnight0 */15 * * * * *
- Every 15 minutes
Cron Validation:
- The system validates Cron expressions in real-time
- Green checkmark indicates valid syntax
- Red X indicates syntax errors
- Click the validation button to see detailed error messages
Error Handling and Notifications
Automatic Error Detection
The system continuously monitors for:
- Failed process instances
- Execution timeouts
- System errors during scheduled runs
Email Notifications
Configuration Requirements:
- Mail provider settings in the system
- Project-specific notification recipients
- SMTP or Mailgun configuration
Notification Content:
- Project name and error summary
- List of failed instances
- Timestamps and error details
- Direct links to the Softyflow interface
Error Resolution
When errors occur:
- Check the notifications for specific error details
- Review the failed instances in the main interface
- Fix underlying issues in the process design
- Re-run or reschedule as needed
Best Practices
Scheduling Guidelines
- Start with Test Mode: Always test schedules in test environment first
- Use Appropriate Intervals: Avoid over-scheduling to prevent system overload
- Monitor Performance: Check system resources when scheduling frequent tasks
- Set Realistic Timeframes: Allow sufficient time for process completion
Cron Expression Tips
- Test Complex Expressions: Use online Cron validators for complex patterns
- Consider Time Zones: Ensure server time zone alignment
- Document Custom Expressions: Add comments explaining complex schedules
- Validate Before Saving: Always check the syntax validator
Environment Management
- Separate Concerns: Use different schedules for different environments
- Production Caution: Double-check all production schedules
- Gradual Rollout: Test in UAT before moving to production
- Monitor Resource Usage: Track system performance across environments
Troubleshooting
Common Issues
Schedule Not Executing:
- Verify the start date/time is in the future
- Check if the associated process exists and is valid
- Ensure the agenda service is running
Cron Expression Errors:
- Use the built-in validator
- Check for proper field count (7 fields required)
- Verify special characters are correctly escaped
Email Notifications Not Sending:
- Verify mail provider configuration
- Check recipient email addresses
- Ensure SMTP/Mailgun credentials are valid
Performance Issues:
- Review scheduling frequency
- Monitor database performance
- Check for overlapping scheduled executions
Getting Help
For additional support:
- Check the system logs for detailed error messages
- Review the agenda job status in the database
- Contact system administrators for infrastructure issues
- Consult the process design documentation for workflow-specific problems