Scheduler
The scheduler node connects a flow to the Smartunit Schedule Service. It can
manage schedules from input messages and emit a message when a subscribed
schedule fires.
Modes And Actions
Section titled “Modes And Actions”| Action | Current behavior |
|---|---|
| Subscribe | Loads the configured schedule when the node starts and emits each tick. |
| Auto | Loads schedules qualified to this node and accepts msg.action at runtime. |
| List | Returns all schedules. |
| Create | Creates a schedule and subscribes this node to it. |
| Update | Updates a target schedule. |
| Delete | Deletes a target schedule and removes its local subscription. |
| Enable / Disable | Changes whether the target schedule can fire. |
| Execute now | Runs the target schedule immediately. |
The runtime also accepts unsubscribe through msg.action in Auto mode,
although it is not currently shown as a fixed editor action.
Inputs
Section titled “Inputs”| Field | Purpose |
|---|---|
msg.action | Selects the operation in Auto mode. |
msg.scheduleId | Target for update, delete, enable, disable, execute, subscribe, or unsubscribe. |
msg.payload.id | Fallback schedule ID. |
msg.payload.name | Schedule name. |
msg.payload.cron | Cron expression. |
msg.payload.enabled | Initial enabled state. |
msg.payload.isDisposable | Whether the schedule is disposable. |
msg.payload.description | Optional description. |
Created schedules are qualified to the scheduler node that created them.
Tick Output
Section titled “Tick Output”When a subscribed schedule fires, msg.payload includes:
scheduleIdnamefiredAt
Management actions return IDs or schedule data in msg.payload.
Lifecycle
Section titled “Lifecycle”Subscriptions are held by the running node. Removing the node unsubscribes its active listeners. If the Schedule Service is unavailable, the node reports a service-unavailable status.
Validate cron expressions and authorization before allowing users or agents to create schedules.