Skip to content

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.

ActionCurrent behavior
SubscribeLoads the configured schedule when the node starts and emits each tick.
AutoLoads schedules qualified to this node and accepts msg.action at runtime.
ListReturns all schedules.
CreateCreates a schedule and subscribes this node to it.
UpdateUpdates a target schedule.
DeleteDeletes a target schedule and removes its local subscription.
Enable / DisableChanges whether the target schedule can fire.
Execute nowRuns 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.

FieldPurpose
msg.actionSelects the operation in Auto mode.
msg.scheduleIdTarget for update, delete, enable, disable, execute, subscribe, or unsubscribe.
msg.payload.idFallback schedule ID.
msg.payload.nameSchedule name.
msg.payload.cronCron expression.
msg.payload.enabledInitial enabled state.
msg.payload.isDisposableWhether the schedule is disposable.
msg.payload.descriptionOptional description.

Created schedules are qualified to the scheduler node that created them.

When a subscribed schedule fires, msg.payload includes:

  • scheduleId
  • name
  • firedAt

Management actions return IDs or schedule data in msg.payload.

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.