Scheduler

Scheduler

ID: uniflow.plugin.scheduler Category: Timer / Logic Version: v1.3.0 Min Uniflow Version: Uniflow ≥ v1.4.0

Scheduler Plugin Reference Manual

1. Overview

Plugin Name: Scheduler

Type: Automation / System

Identifier: uniflow.plugin.scheduler

Description

Provides automated date-, time-, interval-, and Cron-based trigger evaluation for Uniflow industrial rule execution. Evaluates configured schedules across system or IANA timezones and emits multi-format timestamp data (ISO 8601 string, Unix Time in seconds, Unix Time in milliseconds, booleans, and custom values) into the Uniflow telemetry catalog to fire rules on exact schedules.


2. Technical Architecture

The Scheduler plugin implements a high-resolution precision event scheduling engine. It evaluates configured schedules across system or IANA global timezones, supporting daylight saving time transitions. The engine evaluates four timing strategies (DailyTime, OneTime, Cron, and Interval), uses the Cronos parsing engine for 5-field cron syntax validation, and dispatches multi-format timestamp payloads (ISO 8601 string, Unix Time in seconds, Unix Time in milliseconds, boolean, and custom strings/integers) into the Uniflow catalog.

System Interaction & Exposed Catalog Routes

The Scheduler plugin executes time-based rule triggers. It evaluates standard 5-field Cron expressions (via Cronos library), daily time targets, countdown timers, and fixed sub-second interval timers to emit pulse events into the Rule Engine.

Catalog Routes & Node Integration

Input Event Triggers (Input Nodes):

  • scheduler.cron_triggered - Emitted when a Cron schedule matches.
  • scheduler.interval_elapsed - Periodic timer tick event.
  • scheduler.daily_time_reached - Emitted at configured daily time.
  • scheduler.timer_completed - Countdown timer expiration event.
  • Executable Actions (Action Nodes):

  • scheduler.start_timer - Starts a one-shot or recurring timer.
  • scheduler.stop_timer - Stops an active timer.
  • scheduler.trigger_now - Forces an immediate trigger pulse.
  • Architecture Diagram

    VISUAL ARCHITECTURE FLOW DIAGRAM
    Rendering Flow Architecture Diagram...

    3. Configuration Parameters

    The following configuration fields are available in the User Interface for this plugin:

    Configuration SettingDescription
    Source NameFriendly display name of the Scheduler source instance (e.g., Shift Event Scheduler).
    Time ZoneTarget timezone used for schedule evaluation (Local, UTC, or system/IANA timezone ID e.g., UTC, Eastern Standard Time, Europe/London).
    Check Tick (sec)Evaluation check tick frequency in seconds (default 1 second, minimum 1).
    EnabledBoolean flag (True/False) specifying if the scheduler engine is active.

    Scheduled Points & Trigger Configuration

    Each configured Scheduler source manages a collection of scheduled points. Points can be added, edited, or removed using the dedicated Schedule Point Editor Dialog:

    Point ParameterDescription
    Trigger NameFriendly display name of the scheduled trigger point (e.g., Morning Shift Start, Daily Report Generation).
    Schedule TypeSchedule timing strategy: DailyTime, OneTime, Cron, or Interval.
    Time of Day (HH:mm:ss)Time of day target for DailyTime and OneTime schedules (formatted as HH:mm:ss, e.g., 08:30:00).
    Target DateSpecific calendar date target for OneTime schedules.
    Active Days of WeekDay-of-week active flags (Mon, Tue, Wed, Thu, Fri, Sat, Sun) for DailyTime schedules.
    Cron ExpressionStandard 5-field Cron expression (e.g., 0 8 * * 1-5 for Mon-Fri at 8:00 AM) with live preview validation.
    Interval SecondsRecurrence period in seconds for Interval schedules (e.g., 60 for every minute).
    Output Payload FormatPayload format emitted upon trigger: DateTime, UnixTimeSeconds, UnixTimeMilliseconds, Bool, CustomString, Int32.
    Custom String ValueText payload value emitted when PayloadType is CustomString.
    Custom Int ValueInteger payload value emitted when PayloadType is Int32.
    EnabledBoolean flag indicating whether the individual point trigger is enabled.
    Auto-disable (OneTime)Automatically disables the trigger point after firing once (OneTime schedules).

    4. Exposed Routes & Data Types

    This plugin exposes catalog fields across the following rule graph nodes:

    Input Source

    The Input Source node reads multi-format timestamp and payload outputs emitted when a scheduled point trigger fires.

    Human-Readable Field NameData TypeDescription
    Configured Scheduled Point  String` / `Int32` / `Double` / `Bool
    Trigger payload emitted upon schedule firing (ISO 8601 string, Unix Time in seconds, Unix Time in milliseconds, Bool, or custom payload).

    Output Target

    The Output Target node acts as an action sink node to manually force-fire or update a schedule point state.

    Target NameData TypeAssociated ParametersParameter Data TypeRequiredDescription
    Configured Scheduled Point  String` / `Int32` / `Double` / `Bool
    ValueString / Int32 / Double / BoolTruePayload to write or manual trigger signal to dispatch.

    5. Usage Examples

    Scenario A: Daily Morning Cron Schedule Writes BACnet Occupancy & Modbus HVAC Setpoint

    Workflow Overview:

    Every Monday through Friday at 07:30 AM, a Scheduler cron point (0 30 7 * * 1-5) fires a trigger pulse (scheduler.cron_triggered). Uniflow receives the schedule pulse and executes two parallel actions:

    1. Writes BACnet Agent Occupied present value (PresentValue = 1).

    2. Writes Modbus TCP holding register (HoldingRegister 100 = 22.0°C) to pre-condition the office building HVAC.

    Rule Node Configuration:

    1. Event Input Node: Scheduler Cron Listener

  • Cron Expression: 0 30 7 * * 1-5 (Mon-Fri 07:30 AM)
  • Exposed Fields: PointName (String), Timestamp (DateTime)
  • 2. Logic Pass-Through Node: Constant Values

  • Occupancy: 1
  • Setpoint: 22.0
  • 3. Output Target Node A: BACnet Agent Writer

  • Action Target: Writable Object
  • Object: BinaryOutput:1
  • PresentValue: 1
  • 4. Output Target Node B: Modbus Client Writer

  • Action Target: Direct Access
  • Type: Holding Register
  • Address: 100
  • Value: 22.0
  • Logic Flow Diagram:

    VISUAL ARCHITECTURE FLOW DIAGRAM
    Rendering Flow Architecture Diagram...

    Scenario B: Hourly Maintenance Cron Triggers Database Query Execution & FTP Upload

    Workflow Overview:

    At minute 0 of every hour (0 * * * *), a Cron schedule triggers a database snapshot query via DB Link. The resulting data report is written to disk and uploaded (ftp.upload_file) to the corporate SFTP server.

    Rule Node Configuration:

    1. Event Input Node: Scheduler Cron Listener

  • Cron Expression: 0 * * * * (Top of every hour)
  • Exposed Fields: Timestamp (DateTime)
  • 2. Output Target Node A: DB Link Action

  • Action Target: Execute Query
  • Query: SELECT * FROM TelemetryLog WHERE Timestamp >= NOW() - INTERVAL 1 HOUR
  • 3. Output Target Node B: FTP Client Action

  • Action Target: Upload File (ftp.upload_file)
  • Local File Path: C:\Uniflow\Reports\hourly_telemetry.csv
  • Remote Folder: /reports/hourly/
  • Logic Flow Diagram:

    VISUAL ARCHITECTURE FLOW DIAGRAM
    Rendering Flow Architecture Diagram...
    Architecture Flow Diagram — Full Preview