Skip to main content

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

  1. Click "Create Scheduling Tasks" to open the creation dialog

  2. Select Environment Mode:

    • TEST: For development and testing
    • UAT: For user acceptance testing
    • PROD: For production environments
  3. Choose Project and Process:

    • Select the target project from the dropdown
    • Choose the specific process to schedule (filtered by selected project)
  4. 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 AM
  • 0 30 14 * * * * - Every day at 2:30 PM
  • 0 0 0 1 * * * - First day of every month at midnight
  • 0 */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:

  1. Check the notifications for specific error details
  2. Review the failed instances in the main interface
  3. Fix underlying issues in the process design
  4. Re-run or reschedule as needed

Best Practices

Scheduling Guidelines

  1. Start with Test Mode: Always test schedules in test environment first
  2. Use Appropriate Intervals: Avoid over-scheduling to prevent system overload
  3. Monitor Performance: Check system resources when scheduling frequent tasks
  4. Set Realistic Timeframes: Allow sufficient time for process completion

Cron Expression Tips

  1. Test Complex Expressions: Use online Cron validators for complex patterns
  2. Consider Time Zones: Ensure server time zone alignment
  3. Document Custom Expressions: Add comments explaining complex schedules
  4. Validate Before Saving: Always check the syntax validator

Environment Management

  1. Separate Concerns: Use different schedules for different environments
  2. Production Caution: Double-check all production schedules
  3. Gradual Rollout: Test in UAT before moving to production
  4. 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