Skip to main content
A trigger policy decides when a node fires. It can be set on the CLI via --policy SPEC (on node create and node modify) or in source via a #[cerulion_node(...)] attribute. Trigger policy lives only on the macro side; graph YAML carries no policy block.

--policy SPEC grammar

Accepted forms:
There is no default policy keyword — --policy default errors with “unknown policy spec”. A 100 ms period must be written --policy period_ms=100.
There is no deadline_ms policy spec — --policy deadline_ms=N errors with “unknown policy spec deadline_ms”. To watch for late data on a trigger input, use #[input(trigger, expect_within_ms = N)] in your node source.

Macro-attribute equivalents

Each --policy SPEC has an equivalent #[cerulion_node(...)] attribute. See Node macro reference for full attribute semantics. The unbounded_sync, tick_within_ms = N, and throttle_ms = N attributes have no --policy SPEC equivalent; they are macro-only. Write them into nodes/<type>/src/lib.rs yourself.

Defaulting matrix

When --policy is omitted, node create resolves the policy from the declared inputs:

Policy short labels

node list and node info print a short policy label in their POLICY column: