schedule

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2026 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package schedule contains the RRULE schedule trigger node.

Index

Constants

View Source
const PayloadTypeTimestamp = "timestamp"

PayloadTypeTimestamp is the schedule-specific timestamp spelling.

View Source
const Type = "schedule"

Type is the schedule node's palette/deploy type.

Variables

This section is empty.

Functions

func Descriptor

func Descriptor() nodebase.NodeDescriptor

Descriptor returns the schedule node's palette metadata and schema.

func EditorHTML

func EditorHTML() string

EditorHTML returns the embedded editor markup and help text.

Types

type ScheduleConfig

type ScheduleConfig struct {
	// RRule is an RFC 5545 recurrence rule. Accepted forms are a bare
	// FREQ rule, an RRULE:-prefixed rule, or DTSTART/RRULE on two lines.
	RRule string `json:"rrule"`
	// Timezone is empty for server-local time or an IANA timezone name.
	Timezone string `json:"timezone"`
	// PayloadType is timestamp, date, json, string, number, boolean, or
	// environment. Empty defaults to date.
	PayloadType string `json:"payloadType"`
	// Payload is interpreted according to PayloadType on every fire.
	Payload string `json:"payload"`
	// Topic is copied into message metadata on every fire.
	Topic string `json:"topic"`
}

ScheduleConfig holds the schedule node's durable configuration.

type ScheduleNode

type ScheduleNode struct {
	*nodebase.BaseNode
	// contains filtered or unexported fields
}

ScheduleNode is a trigger that arms exactly one in-memory timer for the next RRULE occurrence, emits, then re-arms. Per-run state lives in the host's node-state slot because executors may be rebuilt between deliveries: a rebuilt executor sees started=true and does not double-arm.

func NewScheduleNode

func NewScheduleNode(node nodestore.NodeInterface, config *ScheduleConfig, host nodebase.NodeHost) *ScheduleNode

NewScheduleNode creates a schedule node executor.

func (*ScheduleNode) Activate

func (n *ScheduleNode) Activate(ctx context.Context) error

Activate validates the recurrence and arms the first occurrence. It is idempotent for the lifetime of the workflow run through the host's per-node state slot.

func (*ScheduleNode) Execute

Execute is intentionally inert-invalid: schedule is a source trigger and does not process wired input. Deployment calls Activate instead.

func (*ScheduleNode) Stop

func (n *ScheduleNode) Stop() error

Stop cancels the pending timer. It is idempotent and never resolves the host state slot: the engine may hold its run lock while stopping nodes, so activation caches the state pointer on this executor shell instead.

func (*ScheduleNode) StopKey

func (n *ScheduleNode) StopKey() string

StopKey deduplicates rebuilt executors in the runner's stopper registry.

func (*ScheduleNode) Validate

func (n *ScheduleNode) Validate() error

Validate checks deploy-time configuration. Invalid RRULEs and timezones are deploy errors, while valid exhausted/future rules are accepted and remain dormant.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL