Examples

Recurring

Signals that fire on a schedule without manual triggers.

signals/heartbeat.ts

import { signal } from "station-signal"; export const heartbeat = signal("heartbeat")  .every("5s")  .run(async () => {    console.log(`[heartbeat] ping at ${new Date().toISOString()}`);  });

No input schema needed for recurring signals. .every("5s") schedules the signal to run every 5 seconds. The runner handles re-enqueuing after each execution.

Run it: pnpm --filter example-recurring start


← All examples