Definition: after(delay_ms) { ... } — Allowed: top-level declaration only; Not allowed: nesting inside other blocks.
Schedules a one-shot block that executes once after delay_ms. Declared at the top level when the script loads. Use next; to early-exit the current run.
after(30000) {
logn("30 seconds since boot; doing self-check");
publish("plc/status", "self_check", 1);
}
This block runs once, 30 seconds after the script starts.